xcash / bootstrap-autocomplete

Bootstrap Autocomplete
MIT License
168 stars 72 forks source link

tab key triggers search #111

Open sharakouze opened 3 years ago

sharakouze commented 3 years ago

I don't understand why, but when my select autocomplete got focus via a TAB, it triggers a search event and the dropdown is shown.

This is a problem in a edit form. In this case the autocomplete field is prefilled with the previouly saved value. If the user browses the form with the tab key, when the autocomplete gets the focus, the dropdown appears and if the user hit the tab key again, the autocomplete is cleared but the user didn't request any changes !!

Setting the focus on the autocomplete via the mouse click doesn't have the same behavior

How could I get around this problem ? Thank you

xcash commented 3 years ago

Linked to #114