JedWatson / JedWatson/react-select
onChange and onKeyDown not firing with "tab" only
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 28k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying to use react-select with nested nodes to give users the option to select more specific options relating to parent topics/products. Selection options like clicking the mouse, pressing "Enter" and "Space" all work without issue. For some reason Tab alone is not working. As I mentioned the options are navigable nodes with parents and children. if the previously selected option wasn't a leaf - a node with no children - "Tab" and only tab will not work if you try to use it again as a selection option, instead it will call onInputBlur() and completely skip calling onKeyDown or onChange
So my question is are there any known interactions that could cause onChange or onKeyDown to not fire specifically with tab as a selection option? The code is built on top of another teams code so checking the callstack only returns minified transpiled code that can't really be interpreted.
our current version is ["react-select": "^5.8.0"]
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
No source file, test, or reproducible example is named. Start with a minimal react-select 5.8.0 reproduction using nested parent and child options, then trace the Tab path from keyboard handling through onInputBlur; done means the cause is isolated and a regression test verifies the expected onKeyDown and onChange behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100