diff options
author | Mike Sherov <mike.sherov@gmail.com> | 2013-03-27 16:47:57 -0400 |
---|---|---|
committer | Mike Sherov <mike.sherov@gmail.com> | 2013-04-12 14:45:48 -0400 |
commit | d345a0d7db841a143dcfdd3fb6fa6141cda435e9 (patch) | |
tree | 8acb573c1635ce16e7439404e0295b209a508ad1 /tests/jquery.simulate.js | |
parent | dd58f9832ba34cf99bc3245d0c4c6ccc486a2ddc (diff) | |
download | jquery-ui-d345a0d7db841a143dcfdd3fb6fa6141cda435e9.tar.gz jquery-ui-d345a0d7db841a143dcfdd3fb6fa6141cda435e9.zip |
Draggable: allow draggable to defer destroying itself upon DOM removal until after stop is fired. Fixes #6889 - Draggable: Cursor doesn't revert to pre-dragging state after revert action when original element is removed.
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 ); + } } }); |