mirror of
https://github.com/jquery/jquery.git
synced 2026-02-07 08:44:59 -05:00
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
This commit is contained in:
@@ -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 ] ||
|
||||
|
||||
Reference in New Issue
Block a user