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

map.remove() does not remove Popups #7744

Closed
davidgilbertson opened this issue Jan 4, 2019 · 5 comments · Fixed by #7749
Closed

map.remove() does not remove Popups #7744

davidgilbertson opened this issue Jan 4, 2019 · 5 comments · Fixed by #7749

Comments

@davidgilbertson
Copy link

mapbox-gl-js version: 0.52.0

browser: Chrome 71

Steps to Trigger Behavior

  1. Render a map
  2. Add a new Popup
  3. Call map.remove()

Expected Behavior

The popup should be removed

Actual Behavior

The popup remains behind even after the map is removed.


Seems like map.remove() is removing the mapboxgl-canvas-container div and the mapboxgl-control-container div and some other things, but missing the mapboxgl-popup div, which is a sibling to mapboxgl-canvas-container (and of course it's not just the div...)

For a workaround, I'm tracking and manually removing any popups that I add with popup.remove()

@ryanhamley
Copy link
Contributor

Thanks for reporting this! I can confirm with a minimal repro here.

@davidgilbertson
Copy link
Author

Thanks for doing the repro for me, I was in a rush when I logged this yesterday.

@davidgilbertson
Copy link
Author

That was fast, thanks @andycalder! Any idea when this will be available in a prod release?

@ryanhamley
Copy link
Contributor

@davidgilbertson Our next release will be a beta that's scheduled for January 23rd with the final release a week later on the 30th. You can use the master branch until then if you need this functionality ASAP.

@davidgilbertson
Copy link
Author

That's excellent, thanks. I'm in no rush.

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

Successfully merging a pull request may close this issue.

2 participants