summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Bakaus <paul.bakaus@googlemail.com>2009-01-08 13:39:58 +0000
committerPaul Bakaus <paul.bakaus@googlemail.com>2009-01-08 13:39:58 +0000
commit89338159e41c2d35f1f2ed2a6a0ddfc55b122767 (patch)
treef8e7931e051d993f570f505924598cb064b0b9d4
parent779523c7b5e6fde094856669ff374f2aad6967e7 (diff)
downloadjquery-ui-89338159e41c2d35f1f2ed2a6a0ddfc55b122767.tar.gz
jquery-ui-89338159e41c2d35f1f2ed2a6a0ddfc55b122767.zip
draggable: if cursorAt was used, revert was reverting to the wrong position (fixes #3699)
-rw-r--r--ui/ui.draggable.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/ui/ui.draggable.js b/ui/ui.draggable.js
index 913e3dedb..ccc8557af 100644
--- a/ui/ui.draggable.js
+++ b/ui/ui.draggable.js
@@ -90,15 +90,17 @@ $.widget("ui.draggable", $.extend({}, $.ui.mouse, {
relative: this._getRelativeOffset() //This is a relative to absolute position minus the actual position calculation - only used for relative positioned helper
});
- //Adjust the mouse offset relative to the helper if 'cursorAt' is supplied
- if(o.cursorAt)
- this._adjustOffsetFromHelper(o.cursorAt);
+
//Generate the original position
this.originalPosition = this._generatePosition(event);
this.originalPageX = event.pageX;
this.originalPageY = event.pageY;
+ //Adjust the mouse offset relative to the helper if 'cursorAt' is supplied
+ if(o.cursorAt)
+ this._adjustOffsetFromHelper(o.cursorAt);
+
//Set a containment if given in the options
if(o.containment)
this._setContainment();