diff options
author | Scott González <scott.gonzalez@gmail.com> | 2009-01-28 03:46:35 +0000 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2009-01-28 03:46:35 +0000 |
commit | c9e6d286617de374be9c3cb3cb5b5c9ae445c0a9 (patch) | |
tree | b6238ef97d7736bf3d0aa19ab89fc5bf81788320 /ui | |
parent | cc3064b1f93a782d1522e7f99d65eacecec14b31 (diff) | |
download | jquery-ui-c9e6d286617de374be9c3cb3cb5b5c9ae445c0a9.tar.gz jquery-ui-c9e6d286617de374be9c3cb3cb5b5c9ae445c0a9.zip |
$.widget: Fixed #3965: Copy properties from original event on to new event in _trigger.
Diffstat (limited to 'ui')
-rw-r--r-- | ui/ui.core.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/ui.core.js b/ui/ui.core.js index a6e76436d..547821e34 100644 --- a/ui/ui.core.js +++ b/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 |