Skip to content

Commit

Permalink
core: fixed _trigger not modifing the original event with event.result
Browse files Browse the repository at this point in the history
sortable: use event.result to listen for a return false
  • Loading branch information
Paul Bakaus committed Jan 9, 2009
1 parent de1d540 commit 8427536
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/ui.core.js
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion ui/ui.sortable.js
Expand Up @@ -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: {},
Expand Down

0 comments on commit 8427536

Please sign in to comment.