Popover should default to use anchorEl's parent body if container prop isn't provided #10038
Closed
1 task done
Labels
Milestone
Expected Behavior
Popover renders within the context of the anchorEl document.
Current Behavior
Popover will render in the global document unless an explicit container prop is passed to the popover
Steps to Reproduce (for bugs)
See https://codesandbox.io/s/6lqo45vzvk which is a demo I setup for #10037, which includes an explicit container prop (which is clunky).
Context
The changes made in #9613 have been a great step forward in the right direction, and have largely fixed the issues I was having with rendering MUI components in a separate window (many thanks!!! 🎉). However any component that relies on Popover still has issues, as the container used when creating the Portal defaults to the global
document.body
object, instead of respecting thedocument.body
containing theanchorEl
prop.Your Environment
The text was updated successfully, but these errors were encountered: