aboutsummaryrefslogtreecommitdiffstats
path: root/tests/jquery.simulate.js
diff options
context:
space:
mode:
authorFelix Nagel <info@felixnagel.com>2013-04-21 15:10:38 +0200
committerFelix Nagel <info@felixnagel.com>2013-04-21 15:10:38 +0200
commit4efd006e26a6cdc3bf78832c0a0832e7301c841b (patch)
tree5263fe72e9a2784410632d2dee56efd4e58b83f2 /tests/jquery.simulate.js
parent73c7342bc4418a902bf021c89e7d2c43172e004e (diff)
parent71a332e8b83a1657521e04388f5592997e81bbcc (diff)
downloadjquery-ui-4efd006e26a6cdc3bf78832c0a0832e7301c841b.tar.gz
jquery-ui-4efd006e26a6cdc3bf78832c0a0832e7301c841b.zip
Merge branch 'master' into selectmenu
Diffstat (limited to 'tests/jquery.simulate.js')
-rw-r--r--tests/jquery.simulate.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/jquery.simulate.js b/tests/jquery.simulate.js
index 6e2f3ba8e..0a0c42487 100644
--- a/tests/jquery.simulate.js
+++ b/tests/jquery.simulate.js
@@ -316,8 +316,12 @@ $.extend( $.simulate.prototype, {
this.simulateEvent( document, "mousemove", coord );
}
- this.simulateEvent( target, "mouseup", coord );
- this.simulateEvent( target, "click", coord );
+ if ( $.contains( document, target ) ) {
+ this.simulateEvent( target, "mouseup", coord );
+ this.simulateEvent( target, "click", coord );
+ } else {
+ this.simulateEvent( document, "mouseup", coord );
+ }
}
});