Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-37204

AutoComplete does not trigger onChange when using enter to complete

XMLWordPrintable

      When using auto-completion on a textbox, and using the enter key instead of clicking the value to select a value in the drop-drown list, the onChange event is not triggered. That could make sense if it was when leaving the field, but it's not as well, I guess the browser thinks the value haven't changed since it is set via setting the value attribute directly on the input field, here is where it's happening:

      YAHOO.widget.AutoComplete._updateValue (autocomplete-mi…:formatted:995)
      YAHOO.widget.AutoComplete._selectItem (autocomplete-mi…formatted:1007)
      YAHOO.widget.AutoComplete._onTextboxKeyDown (autocomplete-mi…formatted:1204)
      n (event-min.js:7)
      

      Setting @value doesn't trigger a change event, and leaving the field either.

      This is a problem if we have validation as well using checkUrl or doCheck method, because the we can choose a value using enter, leave the field and the value will never be validated.

            Unassigned Unassigned
            gdelory Guillaume DELORY
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: