Dimensions: ignore transforms when retrieving width/height

Close gh-3561
Fixes gh-3193
This commit is contained in:
Timmy Willison
2017-03-06 17:33:47 -05:00
parent fc34dbc271
commit c920ff6e32
2 changed files with 28 additions and 31 deletions

View File

@@ -527,4 +527,15 @@ QUnit.test( "outside view position (gh-2836)", function( assert ) {
parent.scrollTop( 400 );
} );
QUnit.test( "width/height on element with transform (gh-3193)", function( assert ) {
assert.expect( 2 );
var $elem = jQuery( "<div style='width: 200px; height: 200px; transform: scale(2);' />" )
.appendTo( "#qunit-fixture" );
assert.equal( $elem.width(), 200, "Width ignores transforms" );
assert.equal( $elem.height(), 200, "Height ignores transforms" );
} );
} )();