JedWatson / JedWatson/react-select
Bug with event.stopPropagation() on container completely breaking functionality
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 28k
- Forks
- 4.1k
- PR merge metrics
- No merged PRs in 30d
Description
event.stopPropagation() that was triggered in 'mousedown' listener on container (it can be any container, document.body, for example) break selector (expand, select, etc) if listener function was added after render Select
To reproduce the error, run document.body.addEventListener('mousedown', (event) => {
event.stopPropagation()
}); in console and click on selector
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
Reproduce the problem with the document.body mousedown listener shown in the issue, then trace the Select component's event handling around expansion and selection. Confirm the expected behavior by comparing clicks with and without the listener, and ensure the selector remains usable when propagation is stopped.
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
- 35/100