aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatt Farmer <matt@frmr.me>2012-05-14 14:12:14 -0400
committerDave Methvin <dave.methvin@gmail.com>2012-05-14 14:22:51 -0400
commitca48d490407b198e022b0d0294a7493602155f74 (patch)
treec635be5ffdf87b8e2ba1283ca6f81b9a43b31b78 /src
parent7778c7722239bf5b286e4d8f2740af9abe800c09 (diff)
downloadjquery-ca48d490407b198e022b0d0294a7493602155f74.tar.gz
jquery-ca48d490407b198e022b0d0294a7493602155f74.zip
Fix #6724, though the Mobile Safari wound remains. Closes gh-764.
Diffstat (limited to 'src')
-rw-r--r--src/dimensions.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/dimensions.js b/src/dimensions.js
index 9ea688d76..d4d7915ff 100644
--- a/src/dimensions.js
+++ b/src/dimensions.js
@@ -28,14 +28,13 @@ jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
jQuery.fn[ type ] = function( value ) {
return jQuery.access( this, function( elem, type, value ) {
- var doc, docElemProp, orig, ret;
+ var doc, orig, ret;
if ( jQuery.isWindow( elem ) ) {
- // 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat
- doc = elem.document;
- docElemProp = doc.documentElement[ clientProp ];
- return jQuery.support.boxModel && docElemProp ||
- doc.body && doc.body[ clientProp ] || docElemProp;
+ // 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[ clientProp ];
}
// Get document width or height