Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestions list - enter key different behaviour to click #371

Closed
tstibbs opened this issue Jul 21, 2023 · 1 comment · Fixed by #372
Closed

Suggestions list - enter key different behaviour to click #371

tstibbs opened this issue Jul 21, 2023 · 1 comment · Fixed by #372

Comments

@tstibbs
Copy link
Contributor

tstibbs commented Jul 21, 2023

Selecting a result with the arrow keys and pressing enter should have the same behaviour as clicking on the result (in my opinion).

To reproduce

  1. Visit https://smeijer.github.io/leaflet-geosearch/
  2. Type 'london' into the search box
  3. Wait for suggestions to appear
  4. Click a suggestion - notice that the list of suggestions disappears.
  5. Press the cross to clear the search
  6. Type 'london' in to the search box again
  7. Wait for suggestions to appear
  8. Use arrow keys to select an entry
  9. Press enter

Expected behaviour

On pressing enter, the list of search suggestions should disappear like when you click with the mouse.

Actual behaviour

The list of suggestions remains on screen. It's not entirely obvious how to get rid of them, because clicking on the map doesn't close the list. The only way I can see is to click on the same result again.

Impact

Admittedly minor usability annoyance to those of us that naturally use the keyboard rather than mouse.

Notes

I'm sure this is a simple fix, I'll take a look when I get chance, but first wanted to confirm that this was considered a bug and that there wasn't a reason for this behaviour?

smeijer added a commit that referenced this issue Oct 4, 2023
Fixes #371.

Co-authored-by: Stephan Meijer <stephan.meijer@gmail.com>
@smeijer
Copy link
Owner

smeijer commented Oct 4, 2023

🎉 This issue has been resolved in version 3.10.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants