Wicket
  1. Wicket
  2. WICKET-3605

Ajax header-contribution omits IE conditional comments

    Details

      Description

      We have a header contributor which writes an IE conditional comment to the header response for an IE-specific stylesheet.

      When the page is initially loaded, components on the page render with the IE conditional comment, and are displayed correctly.

      If a component is added by an ajax request, the header contributor renders the conditional comment to the ajax response, but the conditional comment is omitted from the page output.

      1. WICKET-3605-1.5.tgz
        5 kB
        Martin Grigorov
      2. WICKET-3605.patch
        2 kB
        Attila Király
      3. quickstart-browsercss.zip
        28 kB
        Russell Morrisey
      There are no Sub-Tasks for this issue.

        Activity

        Hide
        Russell Morrisey added a comment -

        Attached quickstart to show what on earth I'm talking about. Note that the missing conditional comment is shown in wicket ajax debug.

        Show
        Russell Morrisey added a comment - Attached quickstart to show what on earth I'm talking about. Note that the missing conditional comment is shown in wicket ajax debug.
        Hide
        Pedro Santos added a comment -

        Hi Russell, I just tried to manually add a comment element in the page header element using JavaScript and IE is reporting a error in console: "there are no support for this interface". You can change the ConditionalHeaderContributor to contribute a resource only if the browser matches. e.g using WebClientInfo

        Show
        Pedro Santos added a comment - Hi Russell, I just tried to manually add a comment element in the page header element using JavaScript and IE is reporting a error in console: "there are no support for this interface". You can change the ConditionalHeaderContributor to contribute a resource only if the browser matches. e.g using WebClientInfo
        Hide
        Russell Morrisey added a comment -

        Pedro,

        Thanks for the suggestion! That's what I ended up doing. I would have liked to come up with a fix to contribute to wicket's javascript code; however, I could not determine a way to create a (working) IE conditional comment using javascript after the page load.

        Show
        Russell Morrisey added a comment - Pedro, Thanks for the suggestion! That's what I ended up doing. I would have liked to come up with a fix to contribute to wicket's javascript code; however, I could not determine a way to create a (working) IE conditional comment using javascript after the page load.
        Hide
        Attila Király added a comment -

        This bug affects the 1.5 branch too.

        Adding a patch for trunk. It modifies wicket-ajax.js so comments from the ajax response are processed and attached to the html head too.

        Show
        Attila Király added a comment - This bug affects the 1.5 branch too. Adding a patch for trunk. It modifies wicket-ajax.js so comments from the ajax response are processed and attached to the html head too.
        Hide
        Martin Grigorov added a comment -

        Attaching a quickstart for 1.5.

        Show
        Martin Grigorov added a comment - Attaching a quickstart for 1.5.
        Hide
        Martin Grigorov added a comment -

        The patch is applied to 1.5.

        Show
        Martin Grigorov added a comment - The patch is applied to 1.5.
        Hide
        Martin Grigorov added a comment -

        Now I'm thinking that we can add IHeaderResponse.renderConditionalCssReference() which will create something like <comment> in the header-contribution.
        Looks better to me.

        Show
        Martin Grigorov added a comment - Now I'm thinking that we can add IHeaderResponse.renderConditionalCssReference() which will create something like <comment> in the header-contribution. Looks better to me.

          People

          • Assignee:
            Martin Grigorov
            Reporter:
            Russell Morrisey
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development