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

Broken keyboard navigation through options #1161

Closed
inoric opened this issue Apr 16, 2020 · 5 comments · Fixed by #1165
Closed

Broken keyboard navigation through options #1161

inoric opened this issue Apr 16, 2020 · 5 comments · Fixed by #1165
Labels

Comments

@inoric
Copy link
Contributor

inoric commented Apr 16, 2020

Describe the bug
Selecting options using up/down arrows always jumps to first and last items, skipping everything in between.

To Reproduce
Steps to reproduce the behavior:

  1. Open the dropdown with 3 or more selectable options
  2. Press down key: the last item will be selected
  3. Press up key: the first item will be selected

Expected behavior
Moving through options with arrow keys should select next/previous items, not jump to first/last.

Desktop (please complete the following information):

  • OS: Linux
  • Browser: Firefox 75
  • Version: 3.10.0

Additional context
Seems to be broken in commit 2eb3908.
break statements were removed from typeAheadDown() and typeAheadUp() functions in src/mixins/typeAheadPointer.js. Looks like an accident while removing maybeAdjustScroll.

@mix3d
Copy link

mix3d commented Apr 17, 2020

I tried to create a PR for this, but I'm having a hell of a time getting the code to run on my machine :/
Your missing break comment is likely correct, however.

inoric added a commit to inoric/vue-select that referenced this issue Apr 17, 2020
Fixes sagalbot#1161. Navigating with up or down arrows would always go to first and last option, skipping
everything in between. Caused by missing break statements, probably deleted by accident.

sagalbot#1161
@inoric
Copy link
Contributor Author

inoric commented Apr 17, 2020

Just made a pull request. I rarely contribute to other repos, hope I didn't mess up.

@mix3d I had some trouble running the serve command due to fuse.js, which is required for the test page used in "serve" command but isn't listed in dev dependencies. Not sure if there is something I was doing wrong.

@mix3d
Copy link

mix3d commented Apr 17, 2020

I figured it out. The /docs folder has its own package.json, but it has a bad version number (not 3 part semver), preventing npm install from working. I was able to test and confirm that it is working by adding in back the break;

@mix3d
Copy link

mix3d commented Apr 17, 2020

For some reason, I couldn't use the built file in project though.. not sure what I was doing wrong.

sagalbot pushed a commit that referenced this issue Apr 17, 2020
Fixes #1161. Navigating with up or down arrows would always go to first and last option, skipping
everything in between. Caused by missing break statements, probably deleted by accident.

#1161

Co-authored-by: Dino Pejaković <[email protected]>
@github-actions
Copy link

🎉 This issue has been resolved in version 3.10.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

sagalbot added a commit that referenced this issue Apr 18, 2020
* refactor: don't use the sandbox

* refactor: update docs package.json

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

Successfully merging a pull request may close this issue.

2 participants