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

Wrong location for left/right positions when some parent has position:absolute #155

Open
gdenisov opened this issue Mar 25, 2022 · 1 comment

Comments

@gdenisov
Copy link

When a parent has absolute position "left" and "right" positions seem to be broken and place the content at the right horizontal position but wrong vertical position (the content is placed outside of the view frame at the top of it).

Minimal demo here: https://codesandbox.io/s/lucid-ride-b8dw3w?file=/src/styles.css

Below images assume positions={["left"]} and align="center"

Expectation:
image
Content div appears to the left of the trigger element and is center aligned in relationship to it.

What happens instead:
image
Here we see a peek of the content div at the top of the screen due to browser's default 8px margin on the body element.

@brinsleylogic
Copy link

@alexkatz Any chance of looking in to this? Trying to display in the context of a modal which is centred absolutely.

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

No branches or pull requests

2 participants