-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[BUG] - DropdownItem not getting focused properly and 'Enter' | 'Space' not selecting the item. #2863
Comments
Please share the code also. |
@wingkwong it's reproducible here: code. It doesn't work only in keyboard. Try to select an item using keyboard. |
@matheusboeira you need to set |
@wingkwong, hmm. But I want to change the language after I press the "space" in my keyboard, not on arrow keys. And what about the tabIndex? I want to focus Dropdown first item when DropdownTrigger is open (after pressing space). Version 2.2.10 works as expected. Pressing "Space" opens Dropdown and focus the first item. Items can be "selected" pressing space. |
@matheusboeira oh ok. I misunderstood the problem.
This seems missing indeed.
To set the language, here we still need |
@wingkwong exactly the same code works as expected in version 2.2.10. Pressing "Space" opens Dropdown and focus the first item. Items can be "selected" (change the language) pressing space. |
@matheusboeira can you confirm the following behaviours in 2.2.10?
|
@wingkwong, yes! It should be like that! Screen.Recording.2024-04-25.at.03.23.03.mov |
@matheusboeira Thanks a lot. much cleaner. will take a look. |
I had the same problem but it seems it was fixed, just saying to confirm the bug fix ^_^ |
NextUI Version
2.3.5
Describe the bug
When you focus on the DropdownTrigger, the next step is to press "space" to open the Dropdown. When you press it, you should focus on the first item in the list. Well, that doesn't happen. Furthermore, when you focus on the DropdownItem (after pressing tab until it gets focused), and then press Enter or Space, it closes without selecting the item.
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
Expected behavior
As a user, I would like that when pressing the keyboard "space" while the Dropdown is focused, it focuses on the Dropdown items. Furthermore, pressing the keyboard "Enter" or "Space" should select the item.
Screenshots or Videos
Screen.Recording.2024-04-24.at.02.59.13.mov
Operating System Version
macOS
Browser
Chrome
The text was updated successfully, but these errors were encountered: