Open erber014 opened 11 months ago
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.
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.