Skip to content

Commit

Permalink
core: check for event.originalEvent before copying
Browse files Browse the repository at this point in the history
  • Loading branch information
rdworth committed Jan 28, 2009
1 parent 444bb38 commit ca2f019
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ui/ui.core.js
Expand Up @@ -366,9 +366,11 @@ $.widget.prototype = {
// copy original event properties over to the new event // copy original event properties over to the new event
// this would happen if we could call $.event.fix instead of $.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 // but we don't have a way to force an event to be fixed multiple times
for (var i = $.event.props.length, prop; i;) { if (event.originalEvent) {
prop = $.event.props[--i]; for (var i = $.event.props.length, prop; i;) {
event[prop] = event.originalEvent[prop]; prop = $.event.props[--i];
event[prop] = event.originalEvent[prop];
}
} }


this.element.trigger(event, data); this.element.trigger(event, data);
Expand Down

0 comments on commit ca2f019

Please sign in to comment.