Skip to content
Permalink
Browse files

core: fixed _trigger not modifing the original event with event.result

sortable: use event.result to listen for a return false
  • Loading branch information...
Paul Bakaus
Paul Bakaus committed Jan 9, 2009
1 parent de1d540 commit 842753690a230820639f702176c52de11404f376
Showing with 2 additions and 2 deletions.
  1. +1 −1 ui/ui.core.js
  2. +1 −1 ui/ui.sortable.js
@@ -371,7 +371,7 @@ $.widget.prototype = {
? type : this.widgetEventPrefix + type);

// event can be null, a hash, a native event, a fixed event
event = $.Event(event);
event = event ? $.extend(event, $.Event()) : $.Event();
event.type = eventName;

this.element.trigger(event, data);
@@ -895,7 +895,7 @@ $.widget("ui.sortable", $.extend({}, $.ui.mouse, {
_trigger: function(type, event, inst, noPropagation) {
$.ui.plugin.call(this, type, [event, this._uiHash(inst)]);
if(!noPropagation) $.widget.prototype._trigger.call(this, type, event, this._uiHash(inst));
if(event && event.returnValue === false) this.cancel();
if(event && event.result === false) this.cancel();
},

plugins: {},

0 comments on commit 8427536

Please sign in to comment.
You can’t perform that action at this time.