JedWatson / JedWatson/react-select
onMenuClose fires on blur even though menu is closed
Open
Nobody has claimed this yet.
menu-bug
- Dominant language
- TypeScript
- Stars
- 28k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
There is a call to onMenuClose on every select blur, even when the menu is closed. It was marked as solved in #3876.
Steps to reproduce:
- open codesanbox - https://codesandbox.io/s/react-select-onclosemenufires-on-blur-c2jwo?file=/src/index.tsx
- remove option from select by clicking x on it. Select focuses without menu opening (or just get select to be focused somehow)
- blur the focus by clicking outside of select
- console logs that onMenuClose fired
Thanks for all work that you put into the package.
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 CodeSandbox reproduction linked in the issue and review the earlier fix in #3876. Trace the blur and menu-close behavior shown by the reproduction, then verify that blurring a focused select with a closed menu no longer logs onMenuClose while normal menu closing still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100