From 4986badedfda10d5a3eb319fe107cd4ee128b960 Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Thu, 10 Jun 2010 19:35:46 +0200 Subject: [PATCH] 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. --- horde/js/dragdrop2.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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; -- 2.11.0