aboutsummaryrefslogtreecommitdiffstats
path: root/src/dimensions.js
diff options
context:
space:
mode:
authorDave Methvin <dave.methvin@gmail.com>2015-11-06 12:24:06 -0500
committerDave Methvin <dave.methvin@gmail.com>2015-11-07 15:13:31 -0500
commit7d44d7f9e7cb73ff2b373f08cea13ea9958bb462 (patch)
tree6f24a990acf827f5372d89ee410ab87b53e66f51 /src/dimensions.js
parent2cb8ebadcb77da1c1a12c07bc5274fd456bf3b01 (diff)
downloadjquery-7d44d7f9e7cb73ff2b373f08cea13ea9958bb462.tar.gz
jquery-7d44d7f9e7cb73ff2b373f08cea13ea9958bb462.zip
Dimensions: outerWidth/Height include scrollbar
Fixes gh-1729 Closes gh-2694
Diffstat (limited to 'src/dimensions.js')
-rw-r--r--src/dimensions.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dimensions.js b/src/dimensions.js
index 30b55fbc0..c5f49ac09 100644
--- a/src/dimensions.js
+++ b/src/dimensions.js
@@ -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