Skip to content

Make sure Popover does not render outside the viewport's y axis #1921

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

Open
acelaya opened this issue Mar 24, 2025 · 0 comments
Open

Make sure Popover does not render outside the viewport's y axis #1921

acelaya opened this issue Mar 24, 2025 · 0 comments

Comments

@acelaya
Copy link
Contributor

acelaya commented Mar 24, 2025

Some time ago we implemented some logic to make sure the Popover never spanned outside of the x axis of the viewport, causing a lot of horizontal scroll.

The popover also has some logic to drop up of the anchor element instead of down, if there's not enough space below. However, this logic does not take into consideration that there could also not be enough space above either, so the popover cannot be fully displayed.

We should add some extra logic that ensures the popover is conditionally displayed above or below, but based on where there's more available space. Then we should set a max height that makes scroll to be rendered, preventing part of the popover content to be cropped.

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

1 participant