diff options
author | Will Holley <willholley@gmail.com> | 2013-05-21 15:19:14 +0100 |
---|---|---|
committer | Mike Sherov <mike.sherov@gmail.com> | 2014-08-10 21:00:33 -0400 |
commit | 87081b855c5ded96039d16791a30ff0181fb5a9f (patch) | |
tree | ad4b54fe579b37b51665fef8dd441104a4ea60a6 /tests | |
parent | d434fdbcc2775be4d79c6bb56d3cf3362589fac9 (diff) | |
download | jquery-ui-87081b855c5ded96039d16791a30ff0181fb5a9f.tar.gz jquery-ui-87081b855c5ded96039d16791a30ff0181fb5a9f.zip |
Droppable: only consider pointer location with tolerance "pointer"
Fixes #4977
Closes gh-991
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/droppable/droppable_options.js | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/unit/droppable/droppable_options.js b/tests/unit/droppable/droppable_options.js index 0971f1377..9bfa25881 100644 --- a/tests/unit/droppable/droppable_options.js +++ b/tests/unit/droppable/droppable_options.js @@ -96,7 +96,7 @@ test( "tolerance, intersect", function() { */ test( "tolerance, pointer", function() { - expect( 2 ); + expect( 3 ); var draggable, droppable, dataset = [ @@ -132,6 +132,19 @@ test( "tolerance, pointer", function() { dy: ( data[ 1 ] - $( draggable ).position().top ) }); }); + + // http://bugs.jqueryui.com/ticket/4977 - tolerance, pointer - bug when pointer outside draggable + draggable.css({ top: 0, left: 0 }).draggable( "option", "axis", "x" ); + droppable.css({ top: 15, left: 15 }); + + droppable.unbind( "drop" ).bind( "drop", function() { + ok( true, "drop fires as long as pointer is within droppable" ); + }); + + $( draggable ).simulate( "drag", { + dx: 10, + dy: 10 + }); }); /* |