primereact icon indicating copy to clipboard operation
primereact copied to clipboard

Dropdown: lost focus when select item using keyboard [also lost focus when remove selected item using keyboard]

Open arnodemer opened this issue 1 year ago • 2 comments

Describe the bug

When select dropdown's item using mouse, the focus is restored on dropdown component. But when select item using keyboard, the focus is lost. Also when move focus to X button of selected item and hit enter, dropdown lost focus.

Reproducer

No response

PrimeReact version

10.7.0

React version

17.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

  1. go to Dropdown showcase: https://primereact.org/dropdown/#filter

  2. open dropdown item list

  3. set focus on filter input (in our case, dropdown has autoFocus props set)

  4. use keyboard arrow up/down to pre-select and item

  5. hit Enter keyboard key => item is selected but dropdown component is not focused.

  6. restore focus on dropdown component with selected country item

  7. hit tab to move focus on X cross button

  8. hit enter => the item is removed from dropdown (good) but focus is not restored on dropdown component.

Expected behavior

per accessibility rules, dropdown component should be focused after item selection or after remove selected item

arnodemer avatar Jul 11 '24 13:07 arnodemer

Similar to https://github.com/primefaces/primereact/issues/6803

melloware avatar Jul 11 '24 13:07 melloware

Siimilar to: https://github.com/primefaces/primereact/issues/6269

melloware avatar Jul 11 '24 13:07 melloware

This issue has been automatically marked as stale. If this issue is still affecting you with the latest version, please leave any comment, and we will keep it open. We are sorry that we have not been able to prioritize it yet. If you have any new additional information, please include it with your comment!

github-actions[bot] avatar Jul 07 '25 01:07 github-actions[bot]

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you for your understanding!

github-actions[bot] avatar Jul 14 '25 01:07 github-actions[bot]