aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Bakaus <paul.bakaus@googlemail.com>2008-06-07 14:01:33 +0000
committerPaul Bakaus <paul.bakaus@googlemail.com>2008-06-07 14:01:33 +0000
commitfd8905bcd217ad617f3f28e2a8125697b15d2d2f (patch)
tree7575fcfbe5e88f9665167fdf191bf33e71405b4f
parent4f1c390e298ecaa2d74be8c96c95c7b021cac2b1 (diff)
downloadjquery-ui-fd8905bcd217ad617f3f28e2a8125697b15d2d2f.tar.gz
jquery-ui-fd8905bcd217ad617f3f28e2a8125697b15d2d2f.zip
sortable: fixed update calls (fixes #2968)
-rw-r--r--ui/source/ui.sortable.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/ui/source/ui.sortable.js b/ui/source/ui.sortable.js
index 2f7763e90..a433805e8 100644
--- a/ui/source/ui.sortable.js
+++ b/ui/source/ui.sortable.js
@@ -277,7 +277,7 @@ $.widget("ui.sortable", $.extend($.ui.mouse, {
};
},
mouseStart: function(e, overrideHandle, noActivation) {
-
+
var o = this.options;
this.currentContainer = this;
@@ -521,9 +521,10 @@ $.widget("ui.sortable", $.extend($.ui.mouse, {
},
clear: function(e, noPropagation) {
-
- if(this.domPosition != this.currentItem.prev()[0]) this.propagate("update", e, null, noPropagation); //Trigger update callback if the DOM position has changed
+
+ if(this.domPosition != this.currentItem.prev().not(".ui-sortable-helper")[0]) this.propagate("update", e, null, noPropagation); //Trigger update callback if the DOM position has changed
if(!contains(this.element[0], this.currentItem[0])) { //Node was moved out of the current element
+ if(this.domPosition == this.currentItem.prev().not(".ui-sortable-helper")[0]) this.propagate("update", e, null, noPropagation); //Trigger update callback, if it wasn't triggered before, because that is definitely an update
this.propagate("remove", e, null, noPropagation);
for (var i = this.containers.length - 1; i >= 0; i--){
if(contains(this.containers[i].element[0], this.currentItem[0])) {