aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/draggable
diff options
context:
space:
mode:
authorMike Sherov <mike.sherov@gmail.com>2014-11-08 20:23:08 -0500
committerMike Sherov <mike.sherov@gmail.com>2014-11-08 20:27:05 -0500
commitd8077dc562bfca60906a160e20186608a10b7a87 (patch)
tree45ee2647264cbb06d6ca7a1947633b7932577072 /tests/unit/draggable
parent4e860dca95e3ae35f871ae22256eaa1d18a56fb9 (diff)
downloadjquery-ui-d8077dc562bfca60906a160e20186608a10b7a87.tar.gz
jquery-ui-d8077dc562bfca60906a160e20186608a10b7a87.zip
Draggable: Ensure parent is correct after dragging through sortable
Fixes #10669
Diffstat (limited to 'tests/unit/draggable')
-rw-r--r--tests/unit/draggable/draggable_options.js23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/unit/draggable/draggable_options.js b/tests/unit/draggable/draggable_options.js
index e54ae1df4..d8bbedc91 100644
--- a/tests/unit/draggable/draggable_options.js
+++ b/tests/unit/draggable/draggable_options.js
@@ -405,6 +405,29 @@ test( "connectToSortable, dragging through one sortable to a second", function()
element.simulate( "drag", dragParams );
});
+test( "connectToSortable, dragging through a sortable", function() {
+ expect( 1 );
+
+ var draggable = $( "#draggableSortable" ).draggable({
+ scroll: false,
+ connectToSortable: "#sortable2"
+ }),
+ sortable = $( "#sortable2" ).sortable(),
+ sortableOffset = sortable.offset();
+
+ // http://bugs.jqueryui.com/ticket/10669
+ // Draggable: Position issue with connectToSortable
+ draggable.one( "dragstop", function() {
+ equal( draggable.parent().attr( "id" ), "sortable", "restored draggable to original parent" );
+ });
+
+ draggable.simulate( "drag", {
+ x: sortableOffset.left + 25,
+ y: sortableOffset.top + sortable.outerHeight() + 400,
+ moves: 20
+ });
+});
+
test( "{ containment: Element }", function() {
expect( 1 );