Wicket
  1. Wicket
  2. WICKET-4166

Wicket.Event.add(windows, "domready", ...) is triggered too soon in IE7 with wicket 1.5.x

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 1.5.1, 1.5.2
    • Fix Version/s: None
    • Component/s: wicket
    • Labels:
    • Environment:
      IE7
      windows XP
      Wicket 1.5.x

      Description

      When using wicektstuff-gmap2-example with IE7, the code Wicket.Event.add(window, "domready", function(event) { new WicketMap2('map1'); is triggered before the page is ready.
      So an error is raised saying that "WicketMap2 is undefined".

      It's working fine with IE8/IE9, FF7, Chrome and Opera.

      1. js2.JPG
        144 kB
        Gabriel Landon
      2. js1.JPG
        240 kB
        Gabriel Landon
      3. js0.JPG
        46 kB
        Gabriel Landon

        Activity

        Hide
        Michal Wegrzyn added a comment -

        thanks Alex, helped.
        I had exactly the same issue with FileUpload's progressbar - org.apache.wicket.extensions.ajax.markup.html.form.upload.UploadProgressBar/progressbar.js:

        bind : function(formid)

        { formElement = Wicket.$(formid); this.originalCallback = formElement.onsubmit; formElement.onsubmit = this.submitCallback.bind(this); }

        ,

        formElement was null.

        Works fine with jQuery 1.7.2.

        Show
        Michal Wegrzyn added a comment - thanks Alex, helped. I had exactly the same issue with FileUpload's progressbar - org.apache.wicket.extensions.ajax.markup.html.form.upload.UploadProgressBar/progressbar.js: bind : function(formid) { formElement = Wicket.$(formid); this.originalCallback = formElement.onsubmit; formElement.onsubmit = this.submitCallback.bind(this); } , formElement was null. Works fine with jQuery 1.7.2.
        Hide
        Alex Grant added a comment -

        In case anybody else runs across this issue:

        I had this issue with Wicket 1.5.5.
        ondomready would fire before the other components were loaded in IE7 & IE8 so document.getElementById('someId') would return null.

        It turned out to be a problem with jQuery - upgrading from 1.7 to 1.7.2 fixed the problem. Just importing jQuery was enough to cause the problem; you didn't need to actually use it.

        Show
        Alex Grant added a comment - In case anybody else runs across this issue: I had this issue with Wicket 1.5.5. ondomready would fire before the other components were loaded in IE7 & IE8 so document.getElementById('someId') would return null. It turned out to be a problem with jQuery - upgrading from 1.7 to 1.7.2 fixed the problem. Just importing jQuery was enough to cause the problem; you didn't need to actually use it.
        Hide
        Gabriel Landon added a comment -

        Martin, I'm really sorry, this is indeed working with wicket 1.5.2.
        I guess it was corrected with WICKET-4111.

        Yesterday, I did update my pom.xml with wicket 1.5.2, but forget to regenerate my war! So I was still testing with wicket 1.5.1...

        Thank you for your help. Can you please close this ticket?

        Show
        Gabriel Landon added a comment - Martin, I'm really sorry, this is indeed working with wicket 1.5.2. I guess it was corrected with WICKET-4111 . Yesterday, I did update my pom.xml with wicket 1.5.2, but forget to regenerate my war! So I was still testing with wicket 1.5.1... Thank you for your help. Can you please close this ticket?
        Hide
        Martin Grigorov added a comment -

        Are you sure that 1.5.2 has the problem ?
        There was such problem in 1.5.1 but it is fixed in 1.5.2.
        Please attach a quickstart if 1.5.2 still has this problem.

        Show
        Martin Grigorov added a comment - Are you sure that 1.5.2 has the problem ? There was such problem in 1.5.1 but it is fixed in 1.5.2. Please attach a quickstart if 1.5.2 still has this problem.
        Hide
        Gabriel Landon added a comment -

        screenshots

        Show
        Gabriel Landon added a comment - screenshots

          People

          • Assignee:
            Unassigned
            Reporter:
            Gabriel Landon
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development