Fix #7986. $.support.boxModel shan't be fooled by page-level CSS.

This commit is contained in:
Mike Sherov
2012-02-24 00:14:15 -05:00
committed by Dave Methvin
parent 1c35f3816a
commit a52391aa1d
5 changed files with 34 additions and 18 deletions

View File

@@ -34,7 +34,7 @@ jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
// 3rd condition allows Nokia support, as it supports the docElem prop but not CSS1Compat
doc = elem.document;
docElemProp = doc.documentElement[ clientProp ];
return doc.compatMode === "CSS1Compat" && docElemProp ||
return jQuery.support.boxModel && docElemProp ||
doc.body && doc.body[ clientProp ] || docElemProp;
}