Skip to content
Permalink
Browse files

$.widget: Fixed #3965: Copy properties from original event on to new …

…event in _trigger.
  • Loading branch information
scottgonzalez committed Jan 28, 2009
1 parent cc3064b commit c9e6d286617de374be9c3cb3cb5b5c9ae445c0a9
Showing with 8 additions and 0 deletions.
  1. +8 −0 ui/ui.core.js
@@ -363,6 +363,14 @@ $.widget.prototype = {
event = $.Event(event);
event.type = eventName;

// copy original event properties over to the new event
// this would happen if we could call $.event.fix instead of $.Event
// but we don't have a way to force an event to be fixed multiple times
for (var i = $.event.props.length, prop; i;) {
prop = $.event.props[--i];
event[prop] = event.originalEvent[prop];
}

this.element.trigger(event, data);

return !($.isFunction(callback) && callback.call(this.element[0], event, data) === false

0 comments on commit c9e6d28

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