From: Jan Schneider Date: Thu, 10 Jun 2010 17:35:46 +0000 (+0200) Subject: No need to a placeholder if we can simply use "visibility" instead of X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=4986badedfda10d5a3eb319fe107cd4ee128b960;p=horde.git No need to a placeholder if we can simply use "visibility" instead of "display" for the original element. Also fixes a problem with positioning the hidden element in IE. --- diff --git a/horde/js/dragdrop2.js b/horde/js/dragdrop2.js index f80feaba5..1c5c40b4e 100644 --- a/horde/js/dragdrop2.js +++ b/horde/js/dragdrop2.js @@ -358,8 +358,7 @@ Drag = Class.create({ } this.ghost.setOpacity(0.7).setStyle({ zIndex: z + 1 }); } else { - this.elthold = new Element('DIV').clonePosition(this.element); - this.element.hide().insert({ before: this.elthold }); + this.element.setStyle({ visibility: 'hidden' }); } // Insert ghost into the parent, either specified by a @@ -439,8 +438,7 @@ Drag = Class.create({ if (this.ghost) { if (!this.options.ghosting) { - this.elthold.remove(); - this.element.show(); + this.element.setStyle({ visibility: 'visible' }); } this.ghost.remove(); this.ghost = null;