react-component / react-component/select

Error with shadow dom

Open
#512 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
938
Forks
482
Avg merge
15h 8m
Merged PRs (30d)
2

Description

According to the source code(useSelectTriggerControl.ts), I found that you detected blur by the event.target,but if the target is in a shadow dom, it will not work,you should check event.path[0] besides event.target in this hook

Contributor guide

No contributing guide indexed for this repository

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 in useSelectTriggerControl.ts, where blur is detected from event.target, and review how events from a shadow DOM are represented. Reproduce the blur case with a shadow-DOM target and verify that the hook detects it through the relevant event path; done means the existing behavior works for both regular and shadow-DOM targets.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.