Details

      Description

      Wicket.Event.addDomReadyEvent is broken in IE since 1.5.1. I identified WICKET-4080 as the cause of the problem: onreadystatechange with readyState="loaded" is sometimes fired before the document is fully loaded, causing scripts that reference DOM nodes to fail.

      See http://msdn.microsoft.com/en-us/library/ms534359%28v=vs.85%29.aspx for the order of the readystate events.

      The attached quickstart reproduces the issue (you may need to F5 a few times as it does not happen reliably). The actual JS error is:

      SCRIPT5007: The property "onkeydown" has no value: The object is null or undefined
      wicket-autocomplete-ver-1317728550188.js, Line 91 Character 9

      1. wicket-qs-domready.zip
        22 kB
        Matthias Piepkorn

        Issue Links

          Activity

          Hide
          Martin Grigorov added a comment -

          If you replace
          <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" />
          with
          <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" ></script>
          all works fine.

          My IDE shows me warning that some browsers do not behave well with open-close <script/> elements.

          Show
          Martin Grigorov added a comment - If you replace <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" /> with <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" ></script> all works fine. My IDE shows me warning that some browsers do not behave well with open-close <script/> elements.
          Hide
          Christoph Leiter added a comment -

          I can reliably reproduce this with the given testcase by setting the wicket version in the pom to 1.5.4 and adding
          <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" />
          to the <head>. There seems to be some conflict with jquery. The error message is:

          SCRIPT5007: Unable to get value of the property 'addDomReadyEvent': object is null or undefined
          wicket-ajax-ver-1327324821063.js, line 2471 character 1

          Show
          Christoph Leiter added a comment - I can reliably reproduce this with the given testcase by setting the wicket version in the pom to 1.5.4 and adding <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" /> to the <head>. There seems to be some conflict with jquery. The error message is: SCRIPT5007: Unable to get value of the property 'addDomReadyEvent': object is null or undefined wicket-ajax-ver-1327324821063.js, line 2471 character 1
          Hide
          Martin Grigorov added a comment -

          I just updated http://www.wicket-library.com/wicket-examples/index.html with 1.5.4 and I tried it with IE9 - all works fine here.
          Clean your browser cache and try again.

          Show
          Martin Grigorov added a comment - I just updated http://www.wicket-library.com/wicket-examples/index.html with 1.5.4 and I tried it with IE9 - all works fine here. Clean your browser cache and try again.
          Hide
          Apostolos Apal added a comment - - edited

          tried with IE 9 and wicket 1.5.4 and it doesnt work. re-broken? can somebody double check it? thnx

          (tried AjaxLazyLoadPanel)

          Show
          Apostolos Apal added a comment - - edited tried with IE 9 and wicket 1.5.4 and it doesnt work. re-broken? can somebody double check it? thnx (tried AjaxLazyLoadPanel)
          Hide
          Martin Grigorov added a comment -

          I reverted WICKET-4080.
          Since no one else than Topicus (the reporters of WICKET-4080) had complained about problems in Wicket's domReady() impl and they actually didn't fix their problem completely with WICKET-4080 and then moved to JQuery.ready() I see no reason to fire Wicket's domReady() on 'loaded' state for IE.

          Show
          Martin Grigorov added a comment - I reverted WICKET-4080 . Since no one else than Topicus (the reporters of WICKET-4080 ) had complained about problems in Wicket's domReady() impl and they actually didn't fix their problem completely with WICKET-4080 and then moved to JQuery.ready() I see no reason to fire Wicket's domReady() on 'loaded' state for IE.
          Hide
          Martin Grigorov added a comment - - edited

          I can't reproduce any problem with the attached quickstart with IE9 running in all possible modes (IE7/8/9).

          Show
          Martin Grigorov added a comment - - edited I can't reproduce any problem with the attached quickstart with IE9 running in all possible modes (IE7/8/9).
          Hide
          Emond Papegaaij added a comment -

          It seems the domready handlers used by wicket-event.js are not reliable in IE. We've seen it skip 'complete' entirely, so waiting for 'complete' is not an option. Also, the order documented in the link you gave, is not the order we observed here. It seems IE is not even consistent with its own documentation. I think this needs to be fixed by using the way jquery solves this.

          Show
          Emond Papegaaij added a comment - It seems the domready handlers used by wicket-event.js are not reliable in IE. We've seen it skip 'complete' entirely, so waiting for 'complete' is not an option. Also, the order documented in the link you gave, is not the order we observed here. It seems IE is not even consistent with its own documentation. I think this needs to be fixed by using the way jquery solves this.

            People

            • Assignee:
              Martin Grigorov
              Reporter:
              Matthias Piepkorn
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development