mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
core: check for event.originalEvent before copying
This commit is contained in:
parent
444bb38375
commit
ca2f0191da
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user