[richfaces-planning-issues] [JBoss JIRA] Updated: (RFPL-664) Investigate applying jQuery patch that helps with compat mode to the 4.0 branch

Nick Belaevski (JIRA) jira-events at lists.jboss.org
Sun Sep 26 22:59:29 EDT 2010


     [ https://jira.jboss.org/browse/RFPL-664?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Nick Belaevski updated RFPL-664:
--------------------------------

    Fix Version/s: 4.0.0.Milestone4
                       (was: 4.0.0.Milestone3)


> Investigate applying jQuery patch that helps with compat mode to the 4.0 branch
> -------------------------------------------------------------------------------
>
>                 Key: RFPL-664
>                 URL: https://jira.jboss.org/browse/RFPL-664
>             Project: RichFaces Planning
>          Issue Type: Task
>      Security Level: Public(Everyone can see) 
>          Components: core, third-party
>            Reporter: Jay Balunas
>            Assignee: Nick Belaevski
>             Fix For: 4.0.0.Milestone4
>
>
> There is a problem with jQuery when content type is set to "application/xhtml+xml".
> Nick has submitted a bug to jQuery long ago, but they just don't care, so it was fixed in RF 3.3.x (or ealier) by additional code in jquery.js bundled with richfaces. This code is not any more in RF 4.0.0-SNAPSHOT. Shouldn't it be added?
> It's this code:
>  
>  
> (function() {
>     var safariCompatMode;
>     var getCompatMode = function() {
>         var compatMode = document.compatMode;
>         if (!compatMode && jQuery.browser.safari) {
>             if (!safariCompatMode) {
>                 //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');
>                 safariCompatMode = compatMode = (width == '1px' ? 'BackCompat' : 'CSS1Compat');
>             } else {
>                 compatMode = safariCompatMode;
>             }
>         }
>         return compatMode;
>     };
>     // Create innerHeight, innerWidth, outerHeight and outerWidth methods
>     jQuery.each([ "Height", "Width" ], function(i, name) {
>         var tl = i ? "Left" : "Top",  // top or left
>                 br = i ? "Right" : "Bottom", // bottom or right
>                 lower = name.toLowerCase();
>         // innerHeight and innerWidth
>         jQuery.fn["inner" + name] = function() {
>             return this[0] ?
>                     jQuery.css(this[0], lower, false, "padding") :
>                     null;
>         };
>         // outerHeight and outerWidth
>         jQuery.fn["outer" + name] = function(margin) {
>             return this[0] ?
>                     jQuery.css(this[0], lower, false, margin ? "margin" : "border") :
>                     null;
>         };
>         var type = name.toLowerCase();
>         jQuery.fn[ type ] = function(size) {
>             // Get window width or height
>             return this[0] == window ?
>                 // Everyone else use document.documentElement or document.body depending on Quirks vs Standards mode
>                     getCompatMode() == "CSS1Compat" && document.documentElement[ "client" + name ] ||
>                             document.body[ "client" + name ] :
>                 // Get document width or height
>                     this[0] == document ?
>                         // Either scroll[Width/Height] or offset[Width/Height], whichever is greater
>                             Math.max(
>                                     document.documentElement["client" + name],
>                                     document.body["scroll" + name], document.documentElement["scroll" + name],
>                                     document.body["offset" + name], document.documentElement["offset" + name]
>                                     ) :
>                         // Get or set width or height on the element
>                             size === undefined ?
>                                 // Get width or height on the element
>                                     (this.length ? jQuery.css(this[0], type) : null) :
>                                 // Set the width or height on the element (default to pixels if value is unitless)
>                                     this.css(type, typeof size === "string" ? size : size + "px");
>         };
>     });
> }());

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the richfaces-planning-issues mailing list