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 breaks in v1.1.1 #8535

Closed
Tanguyabel opened this issue Jul 23, 2019 · 2 comments
Closed

Popup breaks in v1.1.1 #8535

Tanguyabel opened this issue Jul 23, 2019 · 2 comments
Assignees
Labels

Comments

@Tanguyabel
Copy link

Hi,
Migrating my code to mapbox-gl v1.1.1 have broken something with the Popup. I use dynamic calls to setLngLat to make it show up after it is first created and added to the map. When I make such a call prior to any move (pan/zoom) on the map, an error occurs and the popup do not show up.

mapbox-gl-js version: 1.1.1

browser: all

Steps to Trigger Behavior

  1. Create a map and add a popup to it
  2. Dynamically display the popup by calling setLngLat later on

Link to Demonstration

https://codepen.io/anon/pen/jgWQYz

In this example we create a map, add a popup to it, then bind mouse over on the map to trigger the positioning of the popup. It is just a dummy way to show the popup for the purpose of this demo. Any other way to dynamically call setLngLat seems to give similar results.

Expected Behavior

The popup should show up.

Actual Behavior

Prior to any move (pan/zoom) on the map, the popup won't show up and the following error will be reported: TypeError: undefined is not an object (evaluating 'this._container.classList')

@mourner
Copy link
Member

mourner commented Jul 23, 2019

The regression likely got introduced in #7786@peterqliu want to take a look?

@peterqliu
Copy link
Contributor

🚢

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

No branches or pull requests

3 participants