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.57k stars 1.67k forks source link

Clicking on the list does not select the item #809

Open ranchmed opened 3 years ago

ranchmed commented 3 years ago

Clicking an item on the selection list sometimes does not select the item. You need to click fast to select the item. If you are slow releasing the mouse button on the click, the item is not selected.

I noticed that this problem does not exist on the demo website. How can I fix this so that the item is selected regardless of how fast the mouse button is released during a click operatoin?

boldtrn commented 3 years ago

Good catch, I was hunting this issue for months! This behavior was introduces here: https://github.com/devbridge/jQuery-Autocomplete/commit/d556a873e7fa6138e4f630d3859f9aed9b975a29

Maybe we could increase 200 ms to 300-400 ms?

boldtrn commented 3 years ago

BTW: I think the demo website uses a very old version of the autocomplete, you might not want to check that too closely ;)