diff options
author | Mike Sherov <mike.sherov@gmail.com> | 2014-08-19 15:09:28 -0400 |
---|---|---|
committer | Mike Sherov <mike.sherov@gmail.com> | 2014-08-20 11:19:36 -0400 |
commit | e12e3e12b19e226b90e4a0ec3848e400a80c8267 (patch) | |
tree | 24d87306fc7d3c7c051e84ec9eb185b0d3d9cbf7 /tests/unit/draggable | |
parent | 233f08e07fc451cff46dff22ba69420ceac72255 (diff) | |
download | jquery-ui-e12e3e12b19e226b90e4a0ec3848e400a80c8267.tar.gz jquery-ui-e12e3e12b19e226b90e4a0ec3848e400a80c8267.zip |
Mouse: Only detect out of document mouseups after a mousemove
This prevents the firing of mouseup in the case of IE<9, which will
fire a mousemove event if content is placed under the cursor on
mousedown.
Fixes #7778
Diffstat (limited to 'tests/unit/draggable')
-rw-r--r-- | tests/unit/draggable/draggable_core.js | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/unit/draggable/draggable_core.js b/tests/unit/draggable/draggable_core.js index 8bc48f14c..4ea5e608a 100644 --- a/tests/unit/draggable/draggable_core.js +++ b/tests/unit/draggable/draggable_core.js @@ -111,6 +111,23 @@ test( "#8269: Removing draggable element on drop", function() { } }); +// http://bugs.jqueryui.com/ticket/7778 +// drag element breaks in IE8 when its content is replaced onmousedown +test( "Stray mousemove after mousedown still drags", function() { + expect( 2 ); + + var element = $( "#draggable1" ).draggable({ scroll: false }); + + // In IE8, when content is placed under the mouse (e.g. when draggable content is replaced + // on mousedown), mousemove is triggered on those elements even though the mouse hasn't moved. + // Support: IE <9 + element.bind( "mousedown", function() { + $( document ).simulate( "mousemove", { button: -1 }); + }); + + TestHelpers.draggable.shouldMove( element, "element is draggable" ); +}); + test( "#6258: not following mouse when scrolled and using overflow-y: scroll", function() { expect( 2 ); |