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 cursor state on popup.remove() (#12223) #12230

Merged
merged 3 commits into from Sep 10, 2022

Conversation

camouflagedName
Copy link
Contributor

@camouflagedName camouflagedName commented Sep 10, 2022

  • add in function to remove 'mapboxgl-track-pointer' from map element class on popup.remove() to return cursor to original state

Launch Checklist

  • briefly describe the changes in this PR
  • add an entry inside this element for inclusion in the mapbox-gl-js changelog: <changelog>returns cursor to original state after a popup is removed</changelog>

- add in function to remove 'mapboxgl-track-pointer' from map element class on popup.remove()
@camouflagedName camouflagedName requested a review from a team as a code owner September 10, 2022 12:41
@CLAassistant
Copy link

CLAassistant commented Sep 10, 2022

CLA assistant check
All committers have signed the CLA.

Copy link
Member

@mourner mourner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thanks!

Copy link
Member

@mourner mourner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please fix the failing unit tests in marker.test.js?

@camouflagedName
Copy link
Contributor Author

I saw that. I think a simple conditional should fix it. Testing it now.

- added conditional to map property canvasContainer in case map is null
@mourner
Copy link
Member

mourner commented Sep 10, 2022

@camouflagedName let's avoid the optional chaining operator for now since it's not yet used anywhere else in the codebase and it started being supported across browsers relatively recently, so introducing it might have unexpected consequences.

- added conditional to check map property canvasContainer exists in case undefined
@mourner mourner merged commit d4a21a0 into mapbox:main Sep 10, 2022
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.

popup.trackPointer() changes cursor style and popup.remove() does not change it back to original state
3 participants