-
Notifications
You must be signed in to change notification settings - Fork 932
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
stateChangeTypes.keyDownArrowDown fires after initial up/down arrow press #708
Comments
Hello. The fact that you get two events in the reducer is expected. One comes with the The other part with on Up Arrow the second event comes as Arrow Down is probably a bug. This probably is easier to fix. From your previous version to this one, the behaviour that changed is that on opening the dropdown by arrow up/down, we will also highlight the last/first item. It's in the ARIA spec on how the widget should work. Let me know if you need any more info and if you're willing to fix this. That would be awesome! Thanks! |
I have a potential PR to deal with the double |
please see my comment in #715 |
I have raised a PR on this issue, please check. |
I will leave it as it is. Please use the new Will be available as soon as I release 4.0.0. |
downshift
version: 3.2.8What you did:
I upgraded my version of downshift to v3.2.8 (up from 2.1.4), and discovered this bug.
What happened:
I use
stateReducer
to modify the highlightedIndex, and I found that when I tabbed to the input with a selected item, and pressed up or down, the highlightedIndex was incorrect.Reproduction repository:
https://codesandbox.io/s/vnyxvwk673
Problem description:
When you tab to the input, and the menu is not opened, and press the down arrow, the change type
Downshift.stateChangeTypes.keyDownArrowDown
fires twice. When the up arrow is pressed, it's still fired when after thekeyDownUpArrow
event fires. I expect it to both not fire when the up arrow is pressed or only once when the down arrow is pressed.Suggested solution:
Haven't had a chance to debug this yet.
The text was updated successfully, but these errors were encountered: