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

Popout Window - react-map-gl interaction breaking #792

Open
ConnorTJolley opened this issue Dec 18, 2024 · 0 comments
Open

Popout Window - react-map-gl interaction breaking #792

ConnorTJolley opened this issue Dec 18, 2024 · 0 comments

Comments

@ConnorTJolley
Copy link

Describe the bug
Apologies for the specific case bug, but if you have a https://visgl.github.io/react-map-gl/docs react-map-gl component within a panel and then have that popout, all interaction seems to break.

To Reproduce

Steps to reproduce the behavior:

  • Have a basic layout of 2/3 panels (ensuring one is a full width/height react-map-gl map component)
  • Interact with the map via dragging and panning the view
  • Observe it is working correctly
  • Popout the panel that contains the map
  • Interact with the map via dragging and panning the view
  • Observe it is not working
  • Click and hold in the map component and drag your mouse over one of the existing panels in the layout
  • Observe the map interaction now briefly does something

Expected behavior
I would expect that the popout of the map panel would ensure that the div the components create for its interaction are retained within the panel and the interaction isn't broken.

Screenshots
div in both DOM elements
Above SC shows that the div the mapbox creates in the root of the DOM it belongs to is still present in the original location of the panel

Canvas in DOM
Above SC shows that the canvas that belongs to the map is present in the popout window

Desktop (please complete the following information):

  • Chrome
  • Version 131.0.6778.140

Additional context
Apologies again for not being able to give a codesandbox or fork that can show this issue better, I do have the following video which demonstrates the issue:

2024-11-27.11-19-44.mp4
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