ICEfaces-EE
  1. ICEfaces-EE
  2. IPCK-214

Rounded corners not rounded in IE 8/Chrome on first load

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-2.0.0.Alpha1
    • Fix Version/s: EE-2.0.0.Beta1
    • Component/s: Facelet Components
    • Labels:
      None
    • Environment:
      IE 8, safari and chrome and tomcat 6

      Description

      The popup rounded corners example seem to work OK on FF on first load. However, ie8, safari and chrome show square corners until the browser is refreshed.

      Further work needs to be done to find out why the rounded corners JavaScript is not be loaded on first load.

        Activity

        Hide
        Patrick Corless added a comment -

        Nils please take a look to see if this is an easy fix. If it looks like it will be a long fix then it would be a good idea to target it for 2.0.0.

        Show
        Patrick Corless added a comment - Nils please take a look to see if this is an easy fix. If it looks like it will be a long fix then it would be a good idea to target it for 2.0.0.
        Hide
        Nils Lundquist added a comment -

        After investigating this it looks like it could be a hard one to debug.

        Each of the four NiftyCheck(...) calls that are added to the page via a partial-update when navigating to the rounded corners example cause a JS parse error.

        "Parse error" for Safari, "Invalid character" for IE8 and "Unexpected token ILLEGAL" on Chrome. All of them at different, seemingly random line numbers.

        Seeing as nifty.js causes JSLint to explode, it's possible there is some character in there that is causing a problem, but you'd expect that the same error would be raised by the parsing done during the refreshed load.

        I'll get nifty.js to pass JSLint cleanly to see if that helps, and if that doesn't solve the problem, it must be caused by some side effect of the partial update.

        Show
        Nils Lundquist added a comment - After investigating this it looks like it could be a hard one to debug. Each of the four NiftyCheck(...) calls that are added to the page via a partial-update when navigating to the rounded corners example cause a JS parse error. "Parse error" for Safari, "Invalid character" for IE8 and "Unexpected token ILLEGAL" on Chrome. All of them at different, seemingly random line numbers. Seeing as nifty.js causes JSLint to explode, it's possible there is some character in there that is causing a problem, but you'd expect that the same error would be raised by the parsing done during the refreshed load. I'll get nifty.js to pass JSLint cleanly to see if that helps, and if that doesn't solve the problem, it must be caused by some side effect of the partial update.
        Hide
        Nils Lundquist added a comment -

        Cleaning up nifty had no effect so I suspect the problem stems from an ajax issue similar to what is being discussed here:
        http://osdir.com/ml/lang.javascript.prototype.window/2006-12/msg00045.html

        Show
        Nils Lundquist added a comment - Cleaning up nifty had no effect so I suspect the problem stems from an ajax issue similar to what is being discussed here: http://osdir.com/ml/lang.javascript.prototype.window/2006-12/msg00045.html
        Hide
        Nils Lundquist added a comment -

        Following the errors caused when Nifty.js fails, manually running the JS that adds the rounded corners, works as expected.

        Ex: Rounded("div#outerTop","tr","#FFF","#94AECE");

        Thus a callback function or other method of delaying this call until after the partial-update is completed is essential.

        Show
        Nils Lundquist added a comment - Following the errors caused when Nifty.js fails, manually running the JS that adds the rounded corners, works as expected. Ex: Rounded("div#outerTop","tr","#FFF","#94AECE"); Thus a callback function or other method of delaying this call until after the partial-update is completed is essential.
        Hide
        Nils Lundquist added a comment -

        An unneeded bean reference that was in the component nested javascript was inserting characters that caused some problems when it came time for JSF to add that javascript to a DOM node; but only on certain browsers. Removed it and things are working fine.

        ---------------------------------------------

        IPCK-214

        Component Javascript segment previously had reference to roundCornersConfig bean for no apparent reason. Wasn't used in a data binding, bean wasn't even configured in faces-config. Removed it and the already commented out outputScript, and the javascript is being executed correctly.

        The annotations in the class ResourceLoadingComponent in the compat-composite-components project is responsible for nifty.js being inserted into the page.

        [Jan 31, 11:31:49] Committing "/compat-composite-components/web/roundcorners/round_corners.xhtml"...
        Sending '/compat-composite-components/web/roundcorners/round_corners.xhtml'
        Transmitting file data for '/compat-composite-components/web/roundcorners/round_corners.xhtml'
        Committed revision 26026 by user "nils.lundquist".
        [Jan 31, 11:58:19] Finished operation.

        Show
        Nils Lundquist added a comment - An unneeded bean reference that was in the component nested javascript was inserting characters that caused some problems when it came time for JSF to add that javascript to a DOM node; but only on certain browsers. Removed it and things are working fine. --------------------------------------------- IPCK-214 Component Javascript segment previously had reference to roundCornersConfig bean for no apparent reason. Wasn't used in a data binding, bean wasn't even configured in faces-config. Removed it and the already commented out outputScript, and the javascript is being executed correctly. The annotations in the class ResourceLoadingComponent in the compat-composite-components project is responsible for nifty.js being inserted into the page. [Jan 31, 11:31:49] Committing "/compat-composite-components/web/roundcorners/round_corners.xhtml"... Sending '/compat-composite-components/web/roundcorners/round_corners.xhtml' Transmitting file data for '/compat-composite-components/web/roundcorners/round_corners.xhtml' Committed revision 26026 by user "nils.lundquist". [Jan 31, 11:58:19] Finished operation.

          People

          • Assignee:
            Nils Lundquist
            Reporter:
            Patrick Corless
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: