mirror of
https://github.com/jquery/jquery.git
synced 2026-02-01 07:55:09 -05:00
Dimensions: outerWidth/Height include scrollbar
Fixes gh-1729 Closes gh-2694
This commit is contained in:
@@ -19,10 +19,10 @@ jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
|
||||
|
||||
if ( jQuery.isWindow( elem ) ) {
|
||||
|
||||
// As of 5/8/2012 this will yield incorrect results for Mobile Safari, but there
|
||||
// isn't a whole lot we can do. See pull request at this URL for discussion:
|
||||
// https://github.com/jquery/jquery/pull/764
|
||||
return elem.document.documentElement[ "client" + name ];
|
||||
// $( window ).outerWidth/Height return w/h including scrollbars (gh-1729)
|
||||
return funcName.indexOf( "outer" ) === 0 ?
|
||||
elem[ "inner" + name ] :
|
||||
elem.document.documentElement[ "client" + name ];
|
||||
}
|
||||
|
||||
// Get document width or height
|
||||
|
||||
Reference in New Issue
Block a user