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

Using arrow keys to navigate down and up again lets you select negative / non-existant entries #190

Closed
account-suspended opened this issue May 29, 2020 · 2 comments · Fixed by #192

Comments

@account-suspended
Copy link

  • vue-autosuggest version: 2.1.1
  • node version: v9.6.1
  • npm version: 6.0.1

What you did:

  1. Go to any implementation, for example: https://darrenjennings.github.io/vue-autosuggest
  2. Type a letter so you get the suggestions
  3. Use the down arrow key to select a suggestion
  4. Use the up arrow key to go back to the input and keep pressing up a couple of times
  5. To get back to the suggestions, you'd expect that the down arrow key would work immediately, but you have to press it as often as you pressed the up arrow key in step 4

Tried it in current versions of Chrome, Firefox, Safari on current macos and Windows.

Suggested solution:
Probably make sure the index variable can't be negative

@darrenjennings
Copy link
Owner

seems like a regression, thanks for noticing. Will coerce the index to not exceed negative -1

@darrenjennings
Copy link
Owner

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

Successfully merging a pull request may close this issue.

2 participants