We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fce39f8 commit dd3c930Copy full SHA for dd3c930
jquery.simulate.js
@@ -318,8 +318,12 @@ $.extend( $.simulate.prototype, {
318
this.simulateEvent( target.ownerDocument, "mousemove", coord );
319
}
320
321
- this.simulateEvent( target, "mouseup", coord );
322
- this.simulateEvent( target, "click", coord );
+ if ( $.contains( document, target ) ) {
+ this.simulateEvent( target, "mouseup", coord );
323
+ this.simulateEvent( target, "click", coord );
324
+ } else {
325
+ this.simulateEvent( document, "mouseup", coord );
326
+ }
327
328
});
329
0 commit comments