]> source.dussan.org Git - jquery-ui.git/commitdiff
sortable: returning false in any callback will now call this.cancenl() to cancel...
authorPaul Bakaus <paul.bakaus@googlemail.com>
Thu, 6 Nov 2008 11:24:34 +0000 (11:24 +0000)
committerPaul Bakaus <paul.bakaus@googlemail.com>
Thu, 6 Nov 2008 11:24:34 +0000 (11:24 +0000)
ui/ui.sortable.js

index d2a185a152539a773183e59efdc9033f9911926d..f49596c234399c73d9e12c752a51d2fde141fc78 100644 (file)
@@ -104,7 +104,8 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, {
 
        _propagate: function(n,e,inst, noPropagation) {
                $.ui.plugin.call(this, n, [e, this._ui(inst)]);
-               if(!noPropagation) this.element.triggerHandler(n == "sort" ? n : "sort"+n, [e, this._ui(inst)], this.options[n]);
+               var dontCancel = !noPropagation ? this.element.triggerHandler(n == "sort" ? n : "sort"+n, [e, this._ui(inst)], this.options[n]) : true;
+               if(dontCancel === false) this.cancel();
        },
 
        serialize: function(o) {