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 container positioning #331

Merged
merged 4 commits into from
Oct 3, 2019
Merged

Menu container positioning #331

merged 4 commits into from
Oct 3, 2019

Conversation

aldhsu
Copy link
Contributor

@aldhsu aldhsu commented Sep 27, 2019

Related to #298 #318 .

Expected

  • Specifying menuContainer to an element that has relative positioning will position the menu correctly inside the container

Actual

  • container is positioned incorrectly unless it is vertically the lowest element on the page
    codepen io_aldhsu_pen_WNeWMxm

See https://codepen.io/aldhsu/pen/WNeWMxm

@aldhsu aldhsu marked this pull request as ready for review September 29, 2019 23:58
@aldhsu aldhsu changed the title WIP: Menu container positioning Menu container positioning Sep 29, 2019
@mrsweaters
Copy link
Collaborator

@aldhsu This looks good and thank you for updating the test suite! I'll merge this in.

@mrsweaters mrsweaters merged commit e8ed5cf into zurb:master Oct 3, 2019
@aldhsu aldhsu deleted the menucontainer-positioning branch October 4, 2019 04:48
@pleunv
Copy link

pleunv commented Oct 21, 2019

This change seems to have completely broken positioning for us in cases where there's not enough space on the bottom and the menu instead positions on top of the trigger. By default we don't specify a menuContainer and instead render in the body, I've tried specifying a custom menuContainer which makes the positioning even worse (the container is relatively positioned). Will see if I can make a repro, but for now we're forced to pin to 3.x.

Edit: Correction, apologies. We had a menuContainer before as it was necessary to fix the positioning. After 4.0 specifying the menuContainer now has the same effect as specifying no menuContainer, resulting in the positioning being completely off. I'm not sure if I'm missing something here.

Strangely enough removing menuContainer and putting position: relative on the body seems to work, but that's not really something I want to do.

@loicndjoyi
Copy link

@pleunv did you find a different solution than putting position relative to the body?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants