From: Paul Bakaus Date: Fri, 7 Nov 2008 15:44:33 +0000 (+0000) Subject: core: height() method wasn't working reliably in Opera - rather than returning the... X-Git-Url: http://git.asbjorn.biz/?a=commitdiff_plain;h=b64d60940d7e66eb636e255b51ea5020c0399524;p=jquery.git core: height() method wasn't working reliably in Opera - rather than returning the actual client height when called on window, it returned the document's height through document.body.clientHeight. The right value to work with is html.clientHeight --- diff --git a/src/core.js b/src/core.js index b35b2e9..081c5b4 100644 --- a/src/core.js +++ b/src/core.js @@ -1347,7 +1347,7 @@ jQuery.each([ "Height", "Width" ], function(i, name){ // Get window width or height return this[0] == window ? // Opera reports document.body.client[Width/Height] properly in both quirks and standards - jQuery.browser.opera && document.body[ "client" + name ] || + jQuery.browser.opera && document.body.parentNode[ "client" + name ] || // Safari reports inner[Width/Height] just fine (Mozilla and Opera include scroll bar widths) jQuery.browser.safari && window[ "inner" + name ] ||