jQuery-Autocomplete icon indicating copy to clipboard operation
jQuery-Autocomplete copied to clipboard

Pressing ENTER causes suggestions to hide

Open ofassley opened this issue 8 years ago • 3 comments

Pressing ENTER inside the input field hides the suggestion list.

To reproduce:

  • Focus on input field
  • Enter any text to display suggestions
  • Press ENTER

You can also test/observe this on the official example: https://www.devbridge.com/sourcery/components/jquery-autocomplete/

This behavior is fine if autoSelectFirst is enabled since pressing ENTER will select the first suggestion.

However, if autoSelectFirst is disabled, as it is by default, hiding all suggestions without making a selection leaves the user confused. It creates the impression that the autocomplete feature has stopped working.

It would be much more intuitive and user-friendly if suggestions remained visible when a user presses ENTER without making a selection. Also, unless I'm missing something, I see no advantage to the current behavior, so it's just confusing and a downside.

Thanks for an otherwise awesome plugin!

ofassley avatar Apr 17 '17 23:04 ofassley

Hi This is still an issue. For example if a user type th full name of th country an clicks enter then everthing aborts. Is there any other solution than autoSelectFirst enabled?

vialcollet avatar Jun 26 '19 10:06 vialcollet

Nope yet. Disable enter key.

diegograziano avatar Aug 26 '19 17:08 diegograziano

This is connected to an issue we are facing. We would like to perform a different operation when ENTER is pressed without selecting any result (we want to navigate to a search page). this is currently not possible.

coorasse avatar Sep 30 '19 13:09 coorasse