diff options
author | TJ VanToll <tj.vantoll@gmail.com> | 2014-07-15 13:38:00 -0400 |
---|---|---|
committer | TJ VanToll <tj.vantoll@gmail.com> | 2014-07-15 15:49:00 -0400 |
commit | 7594a3142547e078326872cb0d6e2d7f32f4c808 (patch) | |
tree | 99a3499c9c2517bdd2dab111e5e79ebe37b0e552 /tests/unit/draggable | |
parent | 2447cabd598ed4b58587fa5054a0c9f7b9bd9bd6 (diff) | |
download | jquery-ui-7594a3142547e078326872cb0d6e2d7f32f4c808.tar.gz jquery-ui-7594a3142547e078326872cb0d6e2d7f32f4c808.zip |
Draggable: Only apply ui-draggable-handle within the draggable instance
Fixes #10212
Closes gh-1284
Diffstat (limited to 'tests/unit/draggable')
-rw-r--r-- | tests/unit/draggable/draggable_core.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/unit/draggable/draggable_core.js b/tests/unit/draggable/draggable_core.js index 7df0969b1..beab67f19 100644 --- a/tests/unit/draggable/draggable_core.js +++ b/tests/unit/draggable/draggable_core.js @@ -274,15 +274,19 @@ asyncTest( "#4261: active element should blur when mousing down on a draggable", }); test( "ui-draggable-handle assigned to appropriate element", function() { - expect( 4 ); + expect( 5 ); - var element = $( "<div><p></p></div>" ).appendTo( "#qunit-fixture" ).draggable(); + var p = $( "<p>" ).appendTo( "#qunit-fixture" ), + element = $( "<div><p></p></div>" ).appendTo( "#qunit-fixture" ).draggable(); ok( element.hasClass( "ui-draggable-handle" ), "handle is element by default" ); element.draggable( "option", "handle", "p" ); ok( !element.hasClass( "ui-draggable-handle" ), "removed from element" ); ok( element.find( "p" ).hasClass( "ui-draggable-handle" ), "added to handle" ); + ok( !p.hasClass( "ui-draggable-handle" ), + "ensure handle class name is constrained within the draggble (#10212)" ); + element.draggable( "destroy" ); ok( !element.find( "p" ).hasClass( "ui-draggable-handle" ), "removed in destroy()" ); }); |