JedWatson / JedWatson/react-select

onChange and onKeyDown not firing with "tab" only

Open
#5,954 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

issue/bug-unconfirmed
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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.