Uploaded image for project: 'HAL'
  1. HAL
  2. HAL-2041

Listeners for keyup event throw an error when autocomplete is used

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • None
    • 3.7.16.Final
    • None
    • None
    • Hide

      Edit any form or open any modal window, fill in some values and save. Then edit/open it again, clicking on an input should now give you suggestions of what you previously put in.

      Show
      Edit any form or open any modal window, fill in some values and save. Then edit/open it again, clicking on an input should now give you suggestions of what you previously put in.

      This has been happening for a while but looks like it never got reported.

      Using the browser autocomplete feature (not the autocomplete widget)

      results in up to three internal errors appearing. The impact is minimal, the value is correctly set. It's reproducible in Chrome/Opera, couldn't reproduce it in Firefox but only because I'm not able to make Firefox remember the values.

      What I found so far - the error is a ClassCastException (Java to JavaScript) coming from a "keyup" event. Normally this event is a KeyboardEvent but using the autocomplete the browser will instead fire keyup as a generic Event (that mostly means there's no event.key variable). The autocomplete seems to pop up only for text and number inputs.

      The primary error comes from from a listener that enables expression support.
      The other two errors happen only in a modal window, from a listener listening for "Escape" which would never be the case with the autocomplete. But this listener is somehow registered twice, hence the two errors.

              mpetrov@redhat.com Michal Petrov
              mpetrov@redhat.com Michal Petrov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: