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

Popover should default to use anchorEl's parent body if container prop isn't provided #10038

Closed
1 task done
ianschmitz opened this issue Jan 25, 2018 · 0 comments
Closed
1 task done
Labels
bug 🐛 Something doesn't work component: Popover The React component.
Milestone

Comments

@ianschmitz
Copy link
Contributor

ianschmitz commented Jan 25, 2018

  • I have searched the issues of this repository and believe that this is not a duplicate.

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 the document.body containing the anchorEl prop.

Your Environment

Tech Version
Material-UI 1.0.0-beta.30
React 16
browser all
etc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: Popover The React component.
Projects
None yet
Development

No branches or pull requests

2 participants