aboutsummaryrefslogtreecommitdiffstats
path: root/ui/tests/jquery.simulate.js
diff options
context:
space:
mode:
authorRichard Worth <rdworth@gmail.com>2008-06-05 12:11:30 +0000
committerRichard Worth <rdworth@gmail.com>2008-06-05 12:11:30 +0000
commit667666fbc6c82467ff7bd3aee247fbfbd554a272 (patch)
treec506bf1284413e33a9b58e50688e5c5c21c78445 /ui/tests/jquery.simulate.js
parentb0a72dc57517b7b8267378db96a80e697bf1f0e4 (diff)
downloadjquery-ui-667666fbc6c82467ff7bd3aee247fbfbd554a272.tar.gz
jquery-ui-667666fbc6c82467ff7bd3aee247fbfbd554a272.zip
set a more reasonable default for relatedTarget: undefined for IE, HEMLHtmlElement for other browsers
Diffstat (limited to 'ui/tests/jquery.simulate.js')
-rw-r--r--ui/tests/jquery.simulate.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/tests/jquery.simulate.js b/ui/tests/jquery.simulate.js
index b425d4e6a..4102d583f 100644
--- a/ui/tests/jquery.simulate.js
+++ b/ui/tests/jquery.simulate.js
@@ -51,7 +51,7 @@ $.extend($.simulate.prototype, {
bubbles: true, cancelable: (type != "mousemove"), view: window, detail: 0,
screenX: 0, screenY: 0, clientX: options.x || 0, clientY: options.y || 0,
ctrlKey: false, altKey: false, shiftKey: false, metaKey: false,
- button: 0, relatedTarget: null
+ button: 0, relatedTarget: undefined
}, options);
var relatedTarget = $(e.relatedTarget)[0];
@@ -61,7 +61,7 @@ $.extend($.simulate.prototype, {
evt.initMouseEvent(type, e.bubbles, e.cancelable, e.view, e.detail,
e.screenX, e.screenY, e.clientX, e.clientY,
e.ctrlKey, e.altKey, e.shiftKey, e.metaKey,
- e.button, relatedTarget);
+ e.button, e.relatedTarget || document.body.parentNode);
} else if (document.createEventObject) {
evt = document.createEventObject();
$.extend(evt, e);