r844 - trunk/ui
r844 - trunk/ui
Author: eduardolundgren
Date: Mon Oct 27 23:41:11 2008
New Revision: 844
Modified:
trunk/ui/ui.sortable.js
Log:
Sortable - Prevent mouseCapture while help is reverting
Modified: trunk/ui/ui.sortable.js
==============================================================================
--- trunk/ui/ui.sortable.js (original)
+++ trunk/ui/ui.sortable.js Mon Oct 27 23:41:11 2008
@@ -384,6 +384,10 @@
_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 @@
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)
@@ -712,6 +718,8 @@
},
_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);