diff options
author | Jason Moon <jmoon@socialcast.com> | 2013-03-21 09:56:39 -0500 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2013-04-17 14:50:11 -0400 |
commit | 9ac505b9fa747a24e5c329cde0614ec0fe49d807 (patch) | |
tree | ac87c5229efe7062aec1da3f80b7c2a73991ec14 /tests | |
parent | 2da014b11d264a49c7ad7075d1fdb66a7d3f009c (diff) | |
download | jquery-ui-9ac505b9fa747a24e5c329cde0614ec0fe49d807.tar.gz jquery-ui-9ac505b9fa747a24e5c329cde0614ec0fe49d807.zip |
Sortable: update placeholder when axis is x or y for connected lists. Fixed #8301 - Placeholder doesn't move when using connectWith option
(cherry picked from commit f306a826a4d3b4c36c3f86cb5feeee23bb0db4c3)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unit/sortable/sortable_options.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/unit/sortable/sortable_options.js b/tests/unit/sortable/sortable_options.js index 8dcf0e82f..a499c01c1 100644 --- a/tests/unit/sortable/sortable_options.js +++ b/tests/unit/sortable/sortable_options.js @@ -151,6 +151,34 @@ test( "#8792: issues with floated items in connected lists", function() { equal( changeCount, 3, "change fired once for each expected change when dragging a floated sortable to a connected container" ); }); +test( "#8301: single axis with connected list", function() { + expect( 1 ); + + var element = $( "#sortable" ).sortable({ + axis: "y", + tolerance: "pointer", + connectWith: ".connected" + }); + + $( "<ul class='connected'><li>Item 7</li><li>Item 8</li></ul>" ) + .sortable({ + axis: "y", + tolerance: "pointer", + connectWith: "#sortable", + receive: function() { + ok( true, "connected list received item" ); + } + }) + .insertAfter( element ); + + element.find( "li" ).eq( 0 ).simulate( "drag", { + handle: "corner", + dx: -1, + dy: 114, + moves: 1 + }); +}); + /* test("{ connectWith: false }, default", function() { ok(false, "missing test - untested code is broken code."); |