diff options
author | Kris Borchers <kris.borchers@gmail.com> | 2013-10-15 21:40:49 -0500 |
---|---|---|
committer | Kris Borchers <kris.borchers@gmail.com> | 2013-10-18 22:12:46 -0500 |
commit | 14065dc23bb453b6c30138f225c9db728dd7e455 (patch) | |
tree | 5f4e9953253a369e43125b6589d10c268f36be57 /tests/unit | |
parent | 7b9c810b9ac450d826b6fa0c3d35377178b7e3b3 (diff) | |
download | jquery-ui-14065dc23bb453b6c30138f225c9db728dd7e455.tar.gz jquery-ui-14065dc23bb453b6c30138f225c9db728dd7e455.zip |
Resizable: Store size based on calculated helper size to prevent 1 pixel shifts. Fixes #9547 - Resizable: off-by-one pixel dimensions with helper and grid
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/resizable/resizable_core.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/unit/resizable/resizable_core.js b/tests/unit/resizable/resizable_core.js index 4cffea185..b02e8b4f1 100644 --- a/tests/unit/resizable/resizable_core.js +++ b/tests/unit/resizable/resizable_core.js @@ -191,4 +191,19 @@ test("resizable accounts for scroll position correctly (#3815)", function() { equal( el.css("top"), top, "css('top') stays the same when resized" ); }); +test( "resizable stores correct size when using helper and grid (#9547)", function() { + expect( 2 ); + + var handle = ".ui-resizable-se", + target = $( "#resizable1" ).resizable({ + handles: "all", + helper: "ui-resizable-helper", + grid: [ 10, 10 ] + }); + + TestHelpers.resizable.drag( handle, 1, 1 ); + equal( target.width(), 100, "compare width" ); + equal( target.height(), 100, "compare height" ); +}); + })(jQuery); |