diff options
author | Mike Sherov <mike.sherov@gmail.com> | 2012-06-07 11:08:31 -0400 |
---|---|---|
committer | Rick Waldron <waldron.rick@gmail.com> | 2012-06-07 11:08:31 -0400 |
commit | c80bc227280e9708dc9c3613ece9397f55f382ed (patch) | |
tree | af6b66e1c8e1d988a16ac39ee5e386f8453c4cb5 /src/css.js | |
parent | 79af1b457baf6e66fff831e7328e06f823445910 (diff) | |
download | jquery-c80bc227280e9708dc9c3613ece9397f55f382ed.tar.gz jquery-c80bc227280e9708dc9c3613ece9397f55f382ed.zip |
Don't swap to measure dimensions unless the element is display:none. #807 Fixes #11293
Diffstat (limited to 'src/css.js')
-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 4496594dc..94f8d8903 100644 --- a/src/css.js +++ b/src/css.js @@ -480,7 +480,7 @@ jQuery.each([ "height", "width" ], function( i, name ) { jQuery.cssHooks[ name ] = { get: function( elem, computed, extra ) { if ( computed ) { - if ( elem.offsetWidth !== 0 ) { + if ( elem.offsetWidth !== 0 || curCSS( elem, "display" ) !== "none" ) { return getWidthOrHeight( elem, name, extra ); } else { return jQuery.swap( elem, cssShow, function() { |