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

Suggestions are automatically displayed in Safari if there is content in the field and 'autofocus' is set #842

Open fschiettecatte opened 2 years ago

fschiettecatte commented 2 years ago

Strange issue which depends on a combination of factors. The suggestions are automatically displayed on Safari if there is content in the field and 'autofocus' is set in the fields. This does not happen on Chrome, Firefox or Microsoft Edge.

Visually what happens is that a search is run, the results are displayed and the search field is pre-filled (using value="foo") with the user's search and the 'autofocus' flag is set so that the cursor automatically positions itself in the field so the user can change the search if needed, and autocomplete displays the suggestions event though the user has not done anything.