From ca2f0191da2e0fe40d04aba8fdab7dcac986e4ce Mon Sep 17 00:00:00 2001 From: Richard Worth Date: Wed, 28 Jan 2009 09:15:51 +0000 Subject: [PATCH] core: check for event.originalEvent before copying --- ui/ui.core.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ui/ui.core.js b/ui/ui.core.js index 547821e34ea..12ee73737bd 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);