-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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: items focused when pressing letters in contexts where they shouldn't #5855
Comments
@melloware I'm experiencing this issue again with keyboard shortcuts such as "Alt+D" (moves the focus to the browser's address bar). |
@inad9300 you want ALT+D blocked if they are in the dropdown? but that is a browser navigation shortcut why would you want it stopped? If you are looking for character "D" for "David" in the dropdown why are you pressing ALT+D which is the browser shortcut to take you to the Navigation bar? |
I'm trying to use a browser shortcut while a dropdown happens to have the focus, and don't want that to start changing things in the UI. Just like in the original ticket, neither "Ctrl+F" nor "Alt+D", etc. should cause the dropdown to open and preselect a new item. Only pressing "F" or "D" without any other key while the dropdown is focused should trigger its opening. |
OH so if you had an item with a D in it its selecting it. That is bad. |
Ahhh I looked through Git History and when PrimeTek refactored for Accesibility they removed the ALT_KEY check. I have restored it for 10.9.2 |
Describe the bug
When a dropdown element is focused, if you use the "Ctrl+F" browser shortcut, the first menu item starting with "F" will be selected.
Reproducer
https://codesandbox.io/s/primereact-demo-forked-y5t86v?file=/src/App.jsx
PrimeReact version
10.3.3
React version
17.x
Language
TypeScript
Build / Runtime
Create React App (CRA)
Browser(s)
No response
Steps to reproduce the behavior
Expected behavior
Shortcuts (not just "Ctrl+F", but all of them) should not have an effect on menu item selection. Native HTML
<select>
elements have the right behavior.The text was updated successfully, but these errors were encountered: