diff options
author | Eduardo Lundgren <eduardolundgren@gmail.com> | 2008-10-28 06:41:11 +0000 |
---|---|---|
committer | Eduardo Lundgren <eduardolundgren@gmail.com> | 2008-10-28 06:41:11 +0000 |
commit | cd01814a85a765759f2e1205355514c75bcdfa2d (patch) | |
tree | 640ad647a8a6052239d5d4b0d4cbe0cdc68bf51f /ui/ui.sortable.js | |
parent | f69197bcec073b6f73b26e93e5fc407b4c5e485e (diff) | |
download | jquery-ui-cd01814a85a765759f2e1205355514c75bcdfa2d.tar.gz jquery-ui-cd01814a85a765759f2e1205355514c75bcdfa2d.zip |
Sortable - Prevent mouseCapture while help is reverting
Diffstat (limited to 'ui/ui.sortable.js')
-rw-r--r-- | ui/ui.sortable.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/ui.sortable.js b/ui/ui.sortable.js index 52e8b6578..d1871c940 100644 --- a/ui/ui.sortable.js +++ b/ui/ui.sortable.js @@ -384,6 +384,10 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, { _mouseCapture: function(e, overrideHandle) { + if (this.reverting) { + return false; + } + if(this.options.disabled || this.options.type == 'static') return false; //We have to refresh the items data once first @@ -697,6 +701,8 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, { var self = this; var cur = self.placeholder.offset(); + self.reverting = true; + $(this.helper).animate({ left: cur.left - this.offset.parent.left - self.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft), top: cur.top - this.offset.parent.top - self.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop) @@ -713,6 +719,8 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, { _clear: function(e, noPropagation) { + this.reverting = false; + //We first have to update the dom position of the actual currentItem if(!this._noFinalSort) this.placeholder.before(this.currentItem); this._noFinalSort = null; |