xcash / bootstrap-autocomplete

Bootstrap Autocomplete
MIT License
168 stars 72 forks source link

Tab triggers autocomplete.freevalue #71

Closed kylesimpson closed 4 years ago

kylesimpson commented 4 years ago

Describe the bug In effort to determine when a user has selected a value from the list and not modified it upon blur, I have relied upon the autocomplete.freevalue event. However, when a user hits "tab" to move to the next field, autocomplete.freevalue is emitted even though a list item is (or should be) still selected.

To Reproduce Steps to reproduce the behavior:

  1. Type value in field that returns results
  2. Select a result
  3. Hit tab to move to next field index
  4. autocomplete.freevalue is emitted

Expected behavior On item 4, autocomplete.freevalue would not be emitted so long as 'tab' is not interpretted as ascii value in the input.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

kylesimpson commented 4 years ago

The workaround here seems to be just to use a select element in the first place, but the comment remains as unexpected behavior.

xcash commented 4 years ago

I need to investigate on this. This could have been introduced by a big change I made recently on event triggering..