Widget Factory: Fixed #3720: Removed use of extra function in jQuery.trigger.

This commit is contained in:
Scott González 2009-01-01 16:12:18 +00:00
parent bd58675f47
commit d76df156ce

View File

@ -375,7 +375,10 @@ $.widget.prototype = {
var eventName = (type == this.widgetEventPrefix var eventName = (type == this.widgetEventPrefix
? type : this.widgetEventPrefix + type); ? type : this.widgetEventPrefix + type);
event = event || $.event.fix({ type: eventName, target: this.element[0] }); event = event || $.event.fix({ type: eventName, target: this.element[0] });
return this.element.triggerHandler(eventName, [event, data], this.options[type]);
this.element.trigger(event, data);
var ret = (this.options[type] && this.options[type].call(this.element[0], event, data));
return !event.isDefaultPrevented() && ret !== false;
} }
}; };