Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Events don't work when creating a portal to an element in shadow DOM #12973

Closed
adrianhelvik opened this issue Jun 3, 2018 · 3 comments
Closed

Comments

@adrianhelvik
Copy link

adrianhelvik commented Jun 3, 2018

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
No events are emitted through the synthetic event system when a portal is created to an element within shadow DOM.

Reproduction
See https://jsfiddle.net/Luktwrdm/453/

What is the expected behavior?
createPortal should detect that the element is inside shadow DOM.

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?
16.4.0
Probably not


This is not a major bug, but a source for some confusion. React should however either support it or add a warning in development.

@hermawan22
Copy link

Wow, nice catch.
Seems we need to re-target the event.

Hopefully i can help, i wanna try learn and contribute on react. :)
I just look around react core code though.

@aweary
Copy link
Contributor

aweary commented Jun 3, 2018

I believe this is the same root issue as #9242

@aweary aweary closed this as completed Jun 3, 2018
@gaearon
Copy link
Collaborator

gaearon commented Aug 17, 2020

This is fixed in React 17 RC.
https://jsfiddle.net/6g3muvfy/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants