devbridge / jQuery-Autocomplete

Ajax Autocomplete for jQuery allows you to easily create autocomplete/autosuggest boxes for text input fields
https://www.devbridge.com/sourcery/components/jquery-autocomplete/
Other
3.56k stars 1.66k forks source link

onSelect getting called without clicking list item #722

Closed hardiktailored closed 6 years ago

hardiktailored commented 6 years ago

onSelect getting called without clicking item in the list when there is only one matching option found in the list.

onSelect should only call when user clicks on list item or presses enter on the list item.

I am redirecting user on new page based on selected item. So when user types and result matches to single records, it calls redirection code I write in onSelect method. Which is a problem as user can't type again as page redirects as soon as onSelect calls.

hardiktailored commented 6 years ago

Resolved. Needed to make triggerSelectOnValidInput: false