diff options
author | Christian Kosmowski <ksmwsk@gmail.com> | 2014-04-14 16:00:42 +0200 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2014-04-18 10:00:42 -0400 |
commit | 1ca84214cc89d9e5f8af12b18b34426fc91b1b08 (patch) | |
tree | d32cff551ae75e5d397b4dbc8c09ba485e452348 /src | |
parent | 4bd2830636350469a7e232e046f41e95383962a3 (diff) | |
download | jquery-1ca84214cc89d9e5f8af12b18b34426fc91b1b08.tar.gz jquery-1ca84214cc89d9e5f8af12b18b34426fc91b1b08.zip |
Dimensions: Reverse a check to avoid potential reflows
Fixes #14979
Closes gh-1560
Diffstat (limited to 'src')
-rw-r--r-- | src/css.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/css.js b/src/css.js index a7f61bb1e..6c20b32df 100644 --- a/src/css.js +++ b/src/css.js @@ -340,7 +340,7 @@ jQuery.each([ "height", "width" ], function( i, name ) { if ( computed ) { // certain elements can have dimension info if we invisibly show them // however, it must have a current display style that would benefit from this - return elem.offsetWidth === 0 && rdisplayswap.test( jQuery.css( elem, "display" ) ) ? + return rdisplayswap.test( jQuery.css( elem, "display" ) ) && elem.offsetWidth === 0 ? jQuery.swap( elem, cssShow, function() { return getWidthOrHeight( elem, name, extra ); }) : |