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 GeolocateControl in Safari #12080

Merged
merged 2 commits into from
Jul 11, 2022
Merged

Fix GeolocateControl in Safari #12080

merged 2 commits into from
Jul 11, 2022

Conversation

mourner
Copy link
Member

@mourner mourner commented Jul 11, 2022

Closes #12074. Turns out #11614 broke GeolocateControl in Safari, because the latter doesn't support the location permissions API, and the fallback route wasn't checked / caught by tests. I updated the unit test so that it fails without the fix, not sure if there's a better way to cover this...

Launch Checklist

  • briefly describe the changes in this PR
  • write tests for all new functionality
  • manually test the debug page
  • apply changelog label ('bug', 'feature', 'docs', etc) or use the label 'skip changelog'
  • add an entry inside this element for inclusion in the mapbox-gl-js changelog: <changelog>Fix GeolocateControl not working in Safari</changelog>

Sorry, something went wrong.

@mourner mourner requested a review from karimnaaji July 11, 2022 13:59
@mourner
Copy link
Member Author

mourner commented Jul 11, 2022

Not sure why CodeBuild failed on the second commit, might be a fluke.

Copy link
Contributor

@karimnaaji karimnaaji left a comment

Choose a reason for hiding this comment

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

👍

@karimnaaji karimnaaji merged commit b9d4009 into main Jul 11, 2022
@karimnaaji karimnaaji deleted the fix-safari-geolocate branch July 11, 2022 19:08
karimnaaji pushed a commit that referenced this pull request Jul 14, 2022
* fix GeolocateControl in Safari

* update geolocate unit test to cover the fix
karimnaaji added a commit that referenced this pull request Jul 14, 2022
* Fallback to hardcoded units in browsers without `NumberFormat` support in `ScaleControl` (#12068)

Add a workaround in ScaleControl to support localization in browsers without NumberFormat support

Co-authored-by: Ansis Brammanis <ansis@mapbox.com>

* Fix GeolocateControl in Safari (#12080)

* fix GeolocateControl in Safari

* update geolocate unit test to cover the fix

Co-authored-by: Stepan Kuzmin <stepan.kuzmin@mapbox.com>
Co-authored-by: Ansis Brammanis <ansis@mapbox.com>
Co-authored-by: Volodymyr Agafonkin <agafonkin@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v2.9.0+ GeolocateControl fails in Safari
2 participants