From 0fa2a825af48adfb0bc9f5bbe8796328266cda0f Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Tue, 20 Apr 2010 19:09:39 +0200 Subject: [PATCH] Start with position of the mousedown event, not of the mouseevent (after applying the threshold). This fixes ghosts not being under the mouse pointer when dragging fast. --- horde/js/dragdrop2.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/horde/js/dragdrop2.js b/horde/js/dragdrop2.js index 37385395d..191a6beba 100644 --- a/horde/js/dragdrop2.js +++ b/horde/js/dragdrop2.js @@ -322,6 +322,10 @@ Drag = Class.create({ if (!this.options.caption) { if (!this.ghost) { + // Use the position of the original click event as the start + // coordinate. + xy = [ this.clickEvent.pointerX(), this.clickEvent.pointerY() ]; + // Create the "ghost", i.e. the moving element, a clone of the // original element, if it doesn't exist yet. var layout = this.element.getLayout(); -- 2.11.0