diff options
author | Mike Sherov <mike.sherov@gmail.com> | 2014-08-05 13:58:11 -0400 |
---|---|---|
committer | Mike Sherov <mike.sherov@gmail.com> | 2014-08-05 14:16:11 -0400 |
commit | 7c8790dcc881c8e82390bb5abe31fad35afdaaa0 (patch) | |
tree | bec2042af67e860daf99da04a795385a9f7c66cc /tests/unit/resizable | |
parent | 750a8fd0c267aaba784f6dc76924619dbb459762 (diff) | |
download | jquery-ui-7c8790dcc881c8e82390bb5abe31fad35afdaaa0.tar.gz jquery-ui-7c8790dcc881c8e82390bb5abe31fad35afdaaa0.zip |
Resizable: account for padding & border in grids.
Fixes #10437
Diffstat (limited to 'tests/unit/resizable')
-rw-r--r-- | tests/unit/resizable/resizable_options.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/unit/resizable/resizable_options.js b/tests/unit/resizable/resizable_options.js index 6d0390b72..36d600061 100644 --- a/tests/unit/resizable/resizable_options.js +++ b/tests/unit/resizable/resizable_options.js @@ -299,6 +299,26 @@ test( "grid - Resizable: can be moved when grid option is set (#9611)", function equal( target.position().left, oldPosition.left, "compare left" ); }); +test( "grid - maintains grid with padding and border when approaching no dimensions", function() { + expect( 2 ); + + // http://bugs.jqueryui.com/ticket/10437 - Resizable: border with grid option working wrong + var handle = ".ui-resizable-nw", + target = $( "#resizable1" ).css({ + padding: 5, + borderWidth: 5, + width: 80, + height: 80 + }).resizable({ + handles: "all", + grid: 50 + }); + + TestHelpers.resizable.drag( handle, 50, 50 ); + equal( target.outerWidth(), 50, "compare width" ); + equal( target.outerHeight(), 50, "compare height" ); +}); + test("ui-resizable-se { handles: 'all', minWidth: 60, minHeight: 60, maxWidth: 100, maxHeight: 100 }", function() { expect(4); |