aboutsummaryrefslogtreecommitdiffstats
path: root/ui/ui.core.js
diff options
context:
space:
mode:
authorRichard Worth <rdworth@gmail.com>2009-01-28 09:15:51 +0000
committerRichard Worth <rdworth@gmail.com>2009-01-28 09:15:51 +0000
commitca2f0191da2e0fe40d04aba8fdab7dcac986e4ce (patch)
tree73a7b73b2380cad8ec2ce855a78f00fbcf51ad73 /ui/ui.core.js
parent444bb383755359761f78766aad13172dd0144e0c (diff)
downloadjquery-ui-ca2f0191da2e0fe40d04aba8fdab7dcac986e4ce.tar.gz
jquery-ui-ca2f0191da2e0fe40d04aba8fdab7dcac986e4ce.zip
core: check for event.originalEvent before copying
Diffstat (limited to 'ui/ui.core.js')
-rw-r--r--ui/ui.core.js8
1 files changed, 5 insertions, 3 deletions
diff --git a/ui/ui.core.js b/ui/ui.core.js
index 547821e34..12ee73737 100644
--- a/ui/ui.core.js
+++ b/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);