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

        Activity

        Russell Morrisey created issue -
        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.
        Russell Morrisey made changes -
        Field Original Value New Value
        Attachment quickstart-browsercss.zip [ 12475859 ]
        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.
        Russell Morrisey made changes -
        Priority Major [ 3 ] Minor [ 4 ]
        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.
        Attila Király made changes -
        Attachment WICKET-3605.patch [ 12477531 ]
        Martin Grigorov made changes -
        Assignee Martin Grigorov [ mgrigorov ]
        Hide
        Martin Grigorov added a comment -

        Attaching a quickstart for 1.5.

        Show
        Martin Grigorov added a comment - Attaching a quickstart for 1.5.
        Martin Grigorov made changes -
        Attachment WICKET-3605-1.5.tgz [ 12477552 ]
        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.
        Martin Grigorov committed 1097149 (1 file)
        Reviews: none

        WICKET-3605 Ajax header-contribution omits IE conditional comments

        Martin Grigorov committed 1097152 (1 file)
        Reviews: none

        WICKET-3605 Ajax header-contribution omits IE conditional comments

        Martin Grigorov made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.4.18 [ 12316329 ]
        Fix Version/s 1.5-RC4 [ 12316330 ]
        Resolution Fixed [ 1 ]
        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.
        Martin Grigorov made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Martin Grigorov made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development