-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Dropdown: Tabbing away from dropdown sets selected item to first option #14307
Comments
I think it's a normal behavior. Just try to tab to the select field, move using your arrow keys, and then click tab again. Your 'pre-selected' option, which was navigated using the arrows, will be taken as the selected option when you tab again. If you dont use arrows, by default it will take the first option. |
Normal behavior indeed : https://www.w3.org/WAI/ARIA/apg/patterns/combobox/examples/combobox-select-only/#kbd_label |
I honestly dislike it, for an optional field that you don't want to fill in you would now need to manually clear the input every time you are navigating through the form. Maybe that's just me though... I also don't remember it working this way before, am I misremembering? |
Oh wait a sec, I assumed that you were talking about the behavior when the dropdown is open. Actually, it looks like a bug to me too, that the first value is selected when tabbing out without opening the dropdown. |
No, I was talking about behavior when dropdown is never open and you are only tabbing through the form. Was starting to think either I was crazy or the world is crazy, thanks. :) |
They've been doing lots of work on fixing dropdown issues lately, and I think this one may have been fixed already. They've got quite the backlog of issues, so if this one is fixed I recommend closing it. |
Hi, So sorry for the delayed response! Improvements have been made to many components recently, both in terms of performance and enhancement. Therefore, this improvement may have been developed in another issue ticket without realizing it. You can check this in the documentation. If there is no improvement on this, can you reopen the issue so we can include it in our roadmap? Best Regards, |
Describe the bug
When tabbing to/from a dropdown in https://primeng.org/dropdown the first option is selected. This is surely not how its meant to work? Navigating through a page using tab should not set values in inputs in my opinion
Environment
https://primeng.org/dropdown latest version 17.0.0
Reproducer
No response
Angular version
Whatever the official site uses
PrimeNG version
latest version 17.0.0
Build / Runtime
Angular CLI App
Language
TypeScript
Node version (for AoT issues node --version)
Whatever the official site uses
Browser(s)
Firefox
Steps to reproduce the behavior
Go to https://primeng.org/dropdown, tab through page from dropdown to dropdown. Watch as all dropdowns have the first option set as selected item.
Expected behavior
Tabbing through dropdown component should not set selected item.
The text was updated successfully, but these errors were encountered: