primefaces / primefaces/primereact

TreeSelect: Clicking outside of the dropdown returns focus to the component input

Open
#8,257 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Status: Needs Triage
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.