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

Autocomplete text fields don't call existing JavaScript event handlers properly

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3.6, 1.4-RC2
    • Fix Version/s: 1.3.7
    • Component/s: wicket-extensions
    • Labels:
      None

      Description

      The Wicket AutocompleteTextField component attaches to an INPUT HTML element. In doing so, it replaces several JavaScript event handlers, such as "onclick", "onblur", etc. It also stores the previous callback handlers and attempts to ensure that they are called whenever the appropriate event occurs. But the logic for this is unfortunately somewhat flawed in Firefox, Safari and Opera browsers, since the original DOM event object is lost.

      The proper fix requires changing code like this:

      if(typeof objonchangeoriginal=="function")objonchangeoriginal();

      into the appropriate call:

      if(typeof objonchangeoriginal=="function")objonchangeoriginal.apply(this,[event]);

      As of version 1.3.6 of Wicket, the following event handler calls should be fixed like this:

      objonchangeoriginal
      objonblur
      objonfocus
      objonchange
      objonkeydown
      objonkeyup
      objonkeypress

        Attachments

          Activity

            People

            • Assignee:
              ivaynberg Igor Vaynberg
              Reporter:
              percederberg Per Cederberg

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment