diff options
author | Mike Sherov <mike.sherov@gmail.com> | 2013-03-26 09:18:00 -0400 |
---|---|---|
committer | Mike Sherov <mike.sherov@gmail.com> | 2013-03-26 09:21:53 -0400 |
commit | e9faec96ed0152a4943efa838b9025d63e3e3093 (patch) | |
tree | e218b9b40e0cec16c7f514663cf5041e8941780c /tests/unit/draggable | |
parent | 53c88a76ab965fed2ace8df42b3890549d2817d6 (diff) | |
download | jquery-ui-e9faec96ed0152a4943efa838b9025d63e3e3093.tar.gz jquery-ui-e9faec96ed0152a4943efa838b9025d63e3e3093.zip |
Draggable Tests: Test that removing an element on drop doesn't cause a draggable error. Fixes #9159 - Draggable Tests: Write test case for #8269
Diffstat (limited to 'tests/unit/draggable')
-rw-r--r-- | tests/unit/draggable/draggable_core.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/unit/draggable/draggable_core.js b/tests/unit/draggable/draggable_core.js index 2090f2fd9..ab63c3703 100644 --- a/tests/unit/draggable/draggable_core.js +++ b/tests/unit/draggable/draggable_core.js @@ -85,4 +85,24 @@ test( "resizable handle with complex markup (#8756 / #8757)", function() { equal( target.width(), 200, "compare width" ); }); +test( "#8269: Removing draggable element on drop", function() { + expect( 1 ); + + var element = $( "#draggable1" ).wrap( "<div id='wrapper' />" ).draggable(), + dropOffset = $( "#droppable" ).offset(); + + $( "#droppable" ).droppable({ + drop: function() { + $( "#wrapper" ).remove(); + ok( true, "element removed from DOM on drop" ); + } + }); + + element.simulate( "drag", { + handle: "corner", + x: dropOffset.left, + y: dropOffset.top + }); +}); + })( jQuery ); |