primefaces / primefaces/primereact
TreeSelect: Clicking outside of the dropdown returns focus to the component input
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 8.3k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
When clicking outside of the dropdown, the focus returns back to the TreeSelect input, even though another focusable component was clicked.
Reproducer
No response
System Information
primeareact: "10.9.7"
react: "19.1.0"
Steps to reproduce the behavior
- Navigate to the TreeSelect component documentation page.
- In any section that shows multiple TreeSelects, click the first TreeSelect to open its dropdown.
- Without closing the first, click a second TreeSelect to open its dropdown.
https://github.com/user-attachments/assets/83228ea1-3c5c-43da-b2b8-689173e7718e
Expected behavior
When clicking outside of the dropdown, the expected behaviour is for the component to lose focus, similar to the dropdown component.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the TreeSelect component and its documentation page, reproducing the interaction by opening one TreeSelect and then clicking a second. Trace the focus behavior when the second component opens; done means focus moves to the newly clicked component rather than returning to the first TreeSelect input, matching the expected dropdown behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100