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

Popup flickers and fails to stay open with defined offset near top of map #13201

Open
two3d opened this issue Jun 16, 2024 · 0 comments
Open

Comments

@two3d
Copy link

two3d commented Jun 16, 2024

Description

There is an issue with popups that have a defined offset when the marker is near the top of the screen. Specifically, when a marker has a defined offset (e.g., -40 in y), the popup flickers and fails to stay open because the popup appears in front of the marker, causing the hover to be lost. This triggers the mouseout event, causing the popup to close and reopen rapidly.

Steps to Reproduce

  1. Create a marker near the top of the map.
  2. Define a popup with an offset (e.g., -40).
  3. Hover over the marker.

Expected Behavior

The popup should open and remain open while the mouse is hovering over the marker or the popup.

Actual Behavior

The popup flickers and fails to stay open because the popup appears in front of the marker, causing the hover to be lost. This triggers the mouseout event, causing the popup to close and reopen rapidly.

See the video for a demonstration

bug-mapbox-popup.mp4

Suggestion for Improvement

It might be helpful to dynamically set the offset to 0 when the popup opens towards the bottom. This could prevent the popup from appearing in front of the marker and losing the hover state.

Implementing this fix would greatly improve the user experience by preventing popup flickering and ensuring that popups remain open when the user hovers over the marker or the popup itself, even with a defined offset. Thank you for considering this bug report!

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