Skip to content
This repository was archived by the owner on Feb 16, 2026. It is now read-only.

Support useRootClose inside open shadow roots#1004

Merged
kyletsang merged 3 commits into
react-bootstrap:masterfrom
charlesroelli:fix-shadow-roots-attempt-2
Jun 2, 2022
Merged

Support useRootClose inside open shadow roots#1004
kyletsang merged 3 commits into
react-bootstrap:masterfrom
charlesroelli:fix-shadow-roots-attempt-2

Conversation

@charlesroelli

Copy link
Copy Markdown
Contributor

useRootClose should inspect Event.composedPath() so that it can react correctly to events coming from an open shadow root.

In order to test this, it was also necessary to add a workaround for simulant which is creating events with composed: false by default.

@charlesroelli

Copy link
Copy Markdown
Contributor Author

Lint errors should be fixed now.

Comment thread src/useRootClose.ts
@kyletsang
kyletsang merged commit 3b7fb53 into react-bootstrap:master Jun 2, 2022
@kyletsang

Copy link
Copy Markdown
Member

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants