Merge branch 'master' of https://github.com/scottjehl/jquery into scottjehl-master
authorJohn Resig <jeresig@gmail.com>
Thu, 20 Jan 2011 19:39:57 +0000 (14:39 -0500)
committerJohn Resig <jeresig@gmail.com>
Thu, 20 Jan 2011 19:39:57 +0000 (14:39 -0500)
src/dimensions.js

index 17b4f8f..e2d411d 100644 (file)
@@ -35,8 +35,10 @@ jQuery.each([ "Height", "Width" ], function( i, name ) {
 
                if ( jQuery.isWindow( elem ) ) {
                        // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
-                       return elem.document.compatMode === "CSS1Compat" && elem.document.documentElement[ "client" + name ] ||
-                               elem.document.body[ "client" + name ];
+                       // 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat
+                       var docElemProp = elem.document.documentElement[ "client" + name ];
+                       return elem.document.compatMode === "CSS1Compat" && docElemProp ||
+                               elem.document.body[ "client" + name ] || docElemProp;
 
                // Get document width or height
                } else if ( elem.nodeType === 9 ) {