aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMike Sherov <mike.sherov@gmail.com>2014-08-04 08:18:35 -0400
committerMike Sherov <mike.sherov@gmail.com>2014-08-04 08:18:35 -0400
commit2779212a0e6e34fdea3f0d442e4d92218ac943fa (patch)
tree31e5e35d1e8526f5388f94fe6a8fbb9540379fb5 /tests
parent5ddc7cd4d325a78e6dae3b7fbdc6313294a6d637 (diff)
downloadjquery-ui-2779212a0e6e34fdea3f0d442e4d92218ac943fa.tar.gz
jquery-ui-2779212a0e6e34fdea3f0d442e4d92218ac943fa.zip
Resizable: Fix containment calculation with relative parent
Remove an incorrect fix introduced in 47cd5b6f that causes width calculations to be incorrect once the correct fix was introduced in c03cb807 Fixes #10140
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/resizable/resizable_options.js16
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/unit/resizable/resizable_options.js b/tests/unit/resizable/resizable_options.js
index 34fef47f0..d0f9f5f05 100644
--- a/tests/unit/resizable/resizable_options.js
+++ b/tests/unit/resizable/resizable_options.js
@@ -155,7 +155,8 @@ test( "aspectRatio: Resizing can move objects", function() {
});
test( "containment", function() {
- expect( 6 );
+ expect( 8 );
+
var element = $( "#resizable1" ).resizable({
containment: "#container"
});
@@ -180,6 +181,19 @@ test( "containment", function() {
TestHelpers.resizable.drag( ".ui-resizable-s", 0, 300 );
equal( element.height(), 400, "element able to resize itself to max allowable height within container" );
+
+ // http://bugs.jqueryui.com/ticket/10140 - Resizable: Width calculation is wrong
+ // when containment element is "position: relative"
+ element = $( "#child" ).resizable({
+ containment: "parent",
+ handles: "all"
+ });
+
+ TestHelpers.resizable.drag( ".ui-resizable-e", 300, 0 );
+ equal( element.width(), 300, "element able to resize itself to max allowable width within container" );
+
+ TestHelpers.resizable.drag( ".ui-resizable-s", 0, 300 );
+ equal( element.height(), 300, "element able to resize itself to max allowable height within container" );
});
test("grid", function() {