diff options
author | Felix Nagel <info@felixnagel.com> | 2013-04-21 15:10:38 +0200 |
---|---|---|
committer | Felix Nagel <info@felixnagel.com> | 2013-04-21 15:10:38 +0200 |
commit | 4efd006e26a6cdc3bf78832c0a0832e7301c841b (patch) | |
tree | 5263fe72e9a2784410632d2dee56efd4e58b83f2 /tests/jquery.simulate.js | |
parent | 73c7342bc4418a902bf021c89e7d2c43172e004e (diff) | |
parent | 71a332e8b83a1657521e04388f5592997e81bbcc (diff) | |
download | jquery-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.js | 8 |
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 ); + } } }); |