Skip to content
Permalink
Browse files

core: check for event.originalEvent before copying

  • Loading branch information
rdworth committed Jan 28, 2009
1 parent 444bb38 commit ca2f0191da2e0fe40d04aba8fdab7dcac986e4ce
Showing with 5 additions and 3 deletions.
  1. +5 −3 ui/ui.core.js
@@ -366,9 +366,11 @@ $.widget.prototype = {
// 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];
if (event.originalEvent) {
for (var i = $.event.props.length, prop; i;) {
prop = $.event.props[--i];
event[prop] = event.originalEvent[prop];
}
}

this.element.trigger(event, data);

0 comments on commit ca2f019

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