mirror of
https://github.com/jquery/jquery-ui.git
synced 2025-01-07 20:34:24 +00:00
Draggable Tests: Test that removing an element on drop doesn't cause a draggable error. Fixes #9159 - Draggable Tests: Write test case for #8269
(cherry picked from commit e9faec96ed
)
This commit is contained in:
parent
f8e76d0bbd
commit
59028995d0
@ -85,4 +85,24 @@ test( "resizable handle with complex markup (#8756 / #8757)", function() {
|
|||||||
equal( target.width(), 200, "compare width" );
|
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 );
|
})( jQuery );
|
||||||
|
Loading…
Reference in New Issue
Block a user