From: Jan Schneider Date: Tue, 20 Apr 2010 17:09:39 +0000 (+0200) Subject: Start with position of the mousedown event, not of the mouseevent (after X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=0fa2a825af48adfb0bc9f5bbe8796328266cda0f;p=horde.git 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. --- 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();