Author: nbelaevski
Date: 2010-11-05 13:59:47 -0400 (Fri, 05 Nov 2010)
New Revision: 19971
Modified:
trunk/core/impl/src/main/resources/META-INF/resources/jquery.js
Log:
https://jira.jboss.org/browse/RFPL-664
Modified: trunk/core/impl/src/main/resources/META-INF/resources/jquery.js
===================================================================
--- trunk/core/impl/src/main/resources/META-INF/resources/jquery.js 2010-11-05 17:33:40
UTC (rev 19970)
+++ trunk/core/impl/src/main/resources/META-INF/resources/jquery.js 2010-11-05 17:59:47
UTC (rev 19971)
@@ -6177,6 +6177,24 @@
elem.defaultView || elem.parentWindow :
false;
}
+
+
+//added by nick
+var detectedCompatMode;
+
+function getCompatMode() {
+ var compatMode = document.compatMode || detectedCompatMode;
+ if (!compatMode) {
+ //detect compatMode as described in
http://code.google.com/p/doctype/wiki/ArticleCompatMode
+ var width = jQuery(document.createElement("div")).attr('style',
'position:absolute;width:0;height:0;width:1').css('width');
+ detectedCompatMode = compatMode = (width == '1px' ? 'BackCompat' :
'CSS1Compat');
+ }
+
+ return compatMode;
+}
+
+//end of added by nick
+
// Create innerHeight, innerWidth, outerHeight and outerWidth methods
jQuery.each([ "Height", "Width" ], function( i, name ) {
@@ -6212,7 +6230,7 @@
return ("scrollTo" in elem && elem.document) ? // does it walk and
quack like a window?
// Everyone else use document.documentElement or document.body depending on Quirks vs
Standards mode
- elem.document.compatMode === "CSS1Compat" &&
elem.document.documentElement[ "client" + name ] ||
+ getCompatMode() /* changed by nick */ === "CSS1Compat" &&
elem.document.documentElement[ "client" + name ] ||
elem.document.body[ "client" + name ] :
// Get document width or height