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

Fix Popup.trackPointer Cannot read property 'classList' of undefined errors #8669

Closed
andrewharvey opened this issue Aug 21, 2019 · 0 comments · Fixed by #8757
Closed

Fix Popup.trackPointer Cannot read property 'classList' of undefined errors #8669

andrewharvey opened this issue Aug 21, 2019 · 0 comments · Fixed by #8757

Comments

@andrewharvey
Copy link
Collaborator

andrewharvey commented Aug 21, 2019

mapbox-gl-js version: 1.2.1

browser: n/a

Steps to Trigger Behavior

var popup = new mapboxgl.Popup({closeOnClick: false})
.setHTML('<h1>Hello World!</h1>')
.addTo(map);
  
popup.trackPointer();

ie call trackPointer without first setting a location or without first setting the popup contents.

Link to Demonstration

https://jsbin.com/jilulagivo/edit?html,output

Expected Behavior

Expected to handle this more gracefully without an error.

Actual Behavior

Cannot read property 'classList' of undefined

If anyone wants to pick this up by all means please do, otherwise I'll try to in a week or so.

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