Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-1607

addDomReadyEvent unreliable for Safari

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.3.0-beta4, 1.3.0-rc1, 1.3.0-rc2, 1.3.0-final, 1.3.1, 1.3.2, 1.3.3
    • 1.3.4, 1.4-M2
    • wicket
    • None
    • Safari 3.1.1

    Description

      Because Safari doesn't support an onDomReady event, wicket-event.js emulates that behavior using timeouts when that browser is detected. However, the timeout is only set once, for 10ms; window.setTimeout() does not produce a repeating timeout. If the document object is not ready at that point, the registered functions are never called. Often it is ready, so the bug is masked.

      I discovered this problem in a page that uses the DateTimeField component, which uses onDomReady for its initialization. Sometimes the component works fine, other times nothing happens when you click. It's a fairly complicated page that apparently Safari may spend more than 10ms building.

      Attachments

        1. safari-domready.patch
          2 kB
          Nathan Hamblen

        Activity

          People

            jcompagner Johan Compagner
            n8han Nathan Hamblen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: