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.
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.
I believe this is the same root issue as https://github.com/facebook/react/issues/9242
This is fixed in React 17 RC.
https://jsfiddle.net/6g3muvfy/
Most helpful comment
I believe this is the same root issue as https://github.com/facebook/react/issues/9242