IssueRaiser

createPortal: support option to stop propagation of events in React tree

**Do you want to request a *feature* or report a *bug*?** Feature, but also a bug cause new API breaks old `unstable_rendersubtreeintocontainer` **What is the current behavior?** We cannot stop all events propagation from portal to its React tree ancestors. Our layers mechanism with modals/popovers completely broken. For example, we have a dropdown button. When we click on it, click opens popover. We also want to close this popover when clicking on same button. With createPortal, click inside popover fires click on button, and it's closing. We can use stopPropagation in this simple case. But we have tons of such cases, and we need use stopPropagation for all of them. Also, we cannot stop all events. **What is the expected behavior?** createPortal should have an option to stop synthetic events propagation through React tree without manually stopping every event. What do you think?

Posted by kib357 on Oct 27, 2017, 3:36 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.4,500 issues0 comments

reliability (Other)

createPortal: support option to stop propagation of events in React tree

kib357Oct 27, 2017, 3:36 PM

**Do you want to request a *feature* or report a *bug*?** Feature, but also a bug cause new API breaks old `unstable_rendersubtreeintocontainer` **What is the current behavior?** We cannot stop all events propagation from portal to its React tree ancestors. Our layers mechanism with modals/popovers completely broken. For example, we have a dropdown button. When we click on it, click opens popover. We also want to close this popover when clicking on same button. With createPortal, click inside popover fires click on button, and it's closing. We can use stopPropagation in this simple case. But we have tons of such cases, and we need use stopPropagation for all of them. Also, we cannot stop all events. **What is the expected behavior?** createPortal should have an option to stop synthetic events propagation through React tree without manually stopping every event. What do you think?

Comments (0)

No comments yet. Start the discussion.

Comment on this issue