aboutsummaryrefslogtreecommitdiffstats
path: root/ui/draggable.js
diff options
context:
space:
mode:
authorMike Sherov <mike.sherov@gmail.com>2014-08-16 21:27:16 -0400
committerMike Sherov <mike.sherov@gmail.com>2014-08-16 21:27:16 -0400
commitb5846bece34db31d69e75cb3a3537827c005910e (patch)
tree59d1d4696ced8b581a26cf457a3ac2c02144c0fc /ui/draggable.js
parentcdcb391f4e33de24df8ff5ce17aeea42f3835dc0 (diff)
downloadjquery-ui-b5846bece34db31d69e75cb3a3537827c005910e.tar.gz
jquery-ui-b5846bece34db31d69e75cb3a3537827c005910e.zip
Draggable: Recalculate hash offset on start after plugins run
Fixes #6884
Diffstat (limited to 'ui/draggable.js')
-rw-r--r--ui/draggable.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/draggable.js b/ui/draggable.js
index 6bd8ea1c1..3e427babe 100644
--- a/ui/draggable.js
+++ b/ui/draggable.js
@@ -614,9 +614,10 @@ $.widget("ui.draggable", $.ui.mouse, {
ui = ui || this._uiHash();
$.ui.plugin.call( this, type, [ event, ui, this ], true );
- // The absolute position has to be recalculated after plugins
- if ( type === "drag" ) {
+ // Absolute position and offset (see #6884 ) have to be recalculated after plugins
+ if ( /^(drag|start|stop)/.test( type ) ) {
this.positionAbs = this._convertPositionTo( "absolute" );
+ ui.offset = this.positionAbs;
}
return $.Widget.prototype._trigger.call( this, type, event, ui );
},