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

[bug]: Is there a way to automatically close a Popover if it is not in viewport? #4856

Open
2 tasks done
kiennt-pivot opened this issue Sep 15, 2024 · 1 comment
Open
2 tasks done
Labels
bug Something isn't working

Comments

@kiennt-pivot
Copy link

Describe the bug

I am attaching a Popover to a button on my menu bar. I want the Popover to be hidden when it is no longer in the Viewport when scrolled up, but it is scrolled down as well. I have tried using z-indexes on other elements overlaying it but it doesn't work.

Affected component/components

Popover

How to reproduce

  1. Create button in navigation
  2. Click button to show Popover
  3. When scroll, Popover is not in Viewport but it always show

Codesandbox/StackBlitz link

No response

Logs

No response

System Info

Google

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues
@kiennt-pivot kiennt-pivot added the bug Something isn't working label Sep 15, 2024
@floris-xlx
Copy link

you have open from the popover, and openOnChange

setting open to false will automatically close it too , throw current Y position and dimensions in an effect and de-render when popover dimensiosn - viewport

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

No branches or pull requests

2 participants