diff options
author | TJ VanToll <tj.vantoll@gmail.com> | 2015-04-05 11:37:53 -0400 |
---|---|---|
committer | TJ VanToll <tj.vantoll@gmail.com> | 2015-04-08 13:15:41 -0400 |
commit | d0ea32e3ad613eaaa523d0c88c776dab2b26b25f (patch) | |
tree | 19c7ce68ab31012f1e1fb0b6e6268c5adbc943d1 /tests/unit | |
parent | c770605db05347edfa9c6224aebd42974092ed22 (diff) | |
download | jquery-ui-d0ea32e3ad613eaaa523d0c88c776dab2b26b25f.tar.gz jquery-ui-d0ea32e3ad613eaaa523d0c88c776dab2b26b25f.zip |
Revert "Draggable: Set explicit width/height instead of right/bottom"
This reverts commit 8eca7b8f45885d20c13f1bf64cad8bee5fc1d5c5.
Fixes #10725
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/draggable/draggable.html | 1 | ||||
-rw-r--r-- | tests/unit/draggable/draggable_core.js | 36 |
2 files changed, 2 insertions, 35 deletions
diff --git a/tests/unit/draggable/draggable.html b/tests/unit/draggable/draggable.html index a8fdf91ca..81fbd8986 100644 --- a/tests/unit/draggable/draggable.html +++ b/tests/unit/draggable/draggable.html @@ -101,7 +101,6 @@ <div id="main"> <div id="draggable1" style="background: green; width: 200px; height: 100px; position: relative; top: 0; left: 0;">Relative</div> <div id="draggable2" style="background: green; width: 200px; height: 100px; position: absolute; top: 10px; left: 10px;"><span><em>Absolute</em></span></div> - <div id="draggable3" style="background: green; position: absolute; right: 5px; bottom: 5px; padding: 7px; border: 3px solid black;"><span><em>Absolute right-bottom</em></span></div> <div id="droppable" style="background: green; width: 200px; height: 100px; position: absolute; top: 110px; left: 110px;"><span>Absolute</span></div> <div id="main-forceScrollable"></div> </div> diff --git a/tests/unit/draggable/draggable_core.js b/tests/unit/draggable/draggable_core.js index 8b3895163..bce3f4e23 100644 --- a/tests/unit/draggable/draggable_core.js +++ b/tests/unit/draggable/draggable_core.js @@ -25,13 +25,6 @@ test( "element types", function() { el.append("<tr><td>content</td></tr>"); } - // intrinsic height is incorrect in FF for buttons with no content - // https://bugzilla.mozilla.org/show_bug.cgi?id=471763 - // Support: FF - if ( typeName === "button" ) { - el.text( "button" ); - } - el.draggable({ cancel: "" }); offsetBefore = el.offset(); el.simulate( "drag", { @@ -42,8 +35,8 @@ test( "element types", function() { // Support: FF, Chrome, and IE9, // there are some rounding errors in so we can't say equal, we have to settle for close enough - closeEnough( offsetBefore.left, offsetAfter.left - 50, 1, "dragged[50, 50] " + "<" + typeName + "> left" ); - closeEnough( offsetBefore.top, offsetAfter.top - 50, 1, "dragged[50, 50] " + "<" + typeName + "> top" ); + closeEnough( offsetBefore.left, offsetAfter.left - 50, 1, "dragged[50, 50] " + "<" + typeName + ">" ); + closeEnough( offsetBefore.top, offsetAfter.top - 50, 1, "dragged[50, 50] " + "<" + typeName + ">" ); el.draggable("destroy"); el.remove(); }); @@ -348,29 +341,4 @@ test( "ui-draggable-handle managed correctly in nested draggables", function( as assert.hasClasses( child, "ui-draggable-handle", "child retains class name on destroy" ); }); -// http://bugs.jqueryui.com/ticket/7772 -// when css 'right' is set, element resizes on drag -test( "setting right/bottom css shouldn't cause resize", function() { - expect( 4 ); - - var finalOffset, - element = $( "#draggable3" ), - origWidth = element.width(), - origHeight = element.height(), - origOffset = element.offset(); - - element.draggable(); - - TestHelpers.draggable.move( element, -50, -50 ); - - finalOffset = element.offset(); - finalOffset.left += 50; - finalOffset.top += 50; - - closeEnough( element.width(), origWidth, 1, "element retains width" ); - closeEnough( element.height(), origHeight, 1, "element retains height" ); - closeEnough( finalOffset.top, origOffset.top, "element moves the correct vertical distance" ); - closeEnough( finalOffset.top, origOffset.top, "element moves the correct horizontal distance" ); -}); - })( jQuery ); |