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

modify setLngLat to instantiate popup element before modifying its classList #8559

Merged
merged 1 commit into from
Jul 26, 2019

Conversation

peterqliu
Copy link
Contributor

Addresses #8535

This bug occurs when attempting to reposition a marker that has been added to the map, but without a lnglat set.

Because setLngLat doesn't create a DOM element for popup until near the end of its run, the operation first tries to edit a classList of a nonexistent this._container element.

This PR modifies setLngLat so that it instantiates the DOM element, before modifying its classList.

Launch Checklist

  • briefly describe the changes in this PR
  • manually test the debug page

@peterqliu peterqliu changed the title check that _container exists before modifying class Instantiate popup element before modifying its classList Jul 25, 2019
@peterqliu peterqliu marked this pull request as ready for review July 26, 2019 00:24
@peterqliu peterqliu merged commit c1ebd9e into master Jul 26, 2019
@peterqliu peterqliu changed the title Instantiate popup element before modifying its classList modify setLngLat to instantiate popup element before modifying its classList Jul 26, 2019
@mourner mourner deleted the fix-popups branch August 1, 2019 11:45
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

Successfully merging this pull request may close these issues.

2 participants