diff options
author | Mike Sherov <mike.sherov@gmail.com> | 2012-05-29 08:46:00 -0400 |
---|---|---|
committer | Dave Methvin <dave.methvin@gmail.com> | 2012-05-31 09:24:44 -0700 |
commit | ba70f8aeb60038ae73b188e432c471f3b115a790 (patch) | |
tree | d9291a4d5ad5e0491917e4cf20b8aab221290ed8 /src/dimensions.js | |
parent | 742872984e000ff8e13b9a23e74852d1b549f161 (diff) | |
download | jquery-ba70f8aeb60038ae73b188e432c471f3b115a790.tar.gz jquery-ba70f8aeb60038ae73b188e432c471f3b115a790.zip |
Fix #11724, $(document).height() in Firefox 12. Closes gh-802.
This reopens #3838 for IE6 which is a regression on a fix in 1.7.2, but we'd rather break a really old IE than a really recent Firefox.
Diffstat (limited to 'src/dimensions.js')
-rw-r--r-- | src/dimensions.js | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/dimensions.js b/src/dimensions.js index bbfc62ad8..d81fb327e 100644 --- a/src/dimensions.js +++ b/src/dimensions.js @@ -23,20 +23,14 @@ jQuery.each( { Height: "height", Width: "width" }, function( name, type ) { // Get document width or height if ( elem.nodeType === 9 ) { - // Either scroll[Width/Height] or offset[Width/Height], whichever is greater doc = elem.documentElement; - // when a window > document, IE6 reports a offset[Width/Height] > client[Width/Height] - // so we can't use max, as it'll choose the incorrect offset[Width/Height] - // instead we use the correct client[Width/Height] - // support:IE6 - if ( doc[ clientProp ] >= doc[ scrollProp ] ) { - return doc[ clientProp ]; - } - + // Either scroll[Width/Height] or offset[Width/Height] or client[Width/Height], whichever is greatest + // unfortunately, this causes bug #3838 in IE6 only, but there is currently no good, small way to fix it. return Math.max( elem.body[ scrollProp ], doc[ scrollProp ], - elem.body[ offsetProp ], doc[ offsetProp ] + elem.body[ offsetProp ], doc[ offsetProp ], + doc[ clientProp ] ); } |