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

[Menu] Does not display in Popover #2450

Closed
mbrookes opened this issue Dec 9, 2015 · 4 comments
Closed

[Menu] Does not display in Popover #2450

mbrookes opened this issue Dec 9, 2015 · 4 comments
Labels
bug 🐛 Something doesn't work

Comments

@mbrookes
Copy link
Member

mbrookes commented Dec 9, 2015

Per gitter discussion, because the Menu component has position:absolute, it falls outside normal HTML flow when rendered inside a Popover, and so does not appear.

The Popover collapses to 0 width and height if there are no other children, or collapses to the size of the other children and shows only the portion of Menu that this exposes.

As a workaround you can applying style={{position: 'static'}} to Menu, but it would be preferable if it was un-positioned (or relatively positioned) by default. Any component that uses menu and requires it to be absolutely positioned can set that itself.

@mbrookes mbrookes changed the title [Menu] Absolute positioning causes it not to be displayed in Popover [Menu] Does not display in Popover Dec 9, 2015
@oliviertassinari
Copy link
Member

because the Menu component has position:absolute

Looks like you are right 😳. https://github.com/callemall/material-ui/blob/master/src/menus/menu.jsx#L154
Can't we just remove this position property? I don't really see the use case.

@mbrookes
Copy link
Member Author

mbrookes commented Dec 9, 2015

I hope so, but I didn't just want to submit a PR without opening an issue first, in case it was that way for a reason, or other would break other components if they depend on this property, and don't set it explicitly.

@alitaheri
Copy link
Member

@oliviertassinari It was there for the previous way of using it. when popover wan't around anymore. I think we can remove it. @mbrookes Will you do the honors? 👍 👍 Thanks for creating this issue here.

@alitaheri alitaheri added the bug 🐛 Something doesn't work label Dec 9, 2015
@alitaheri alitaheri modified the milestone: 0.14.0 Release Dec 9, 2015
alitaheri added a commit that referenced this issue Dec 9, 2015
Remove absolute positioning - addresses #2450
@mbrookes mbrookes closed this as completed Dec 9, 2015
@mbrookes
Copy link
Member Author

mbrookes commented Dec 9, 2015

Fixed in #2455.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work
Projects
None yet
Development

No branches or pull requests

3 participants