-
Notifications
You must be signed in to change notification settings - Fork 51
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
[Problem/Bug]: Geolocation regression in WebView2 Canary #4567
Comments
Thank you for opening the report. The change you're seeing is from a new fix in Canary and it's flowing into Stable 126. The tl;dr of that change is that geolocation is obviously sensitive user information and historically we've been relying on built-in WebView2 per-origin location prompt to gather consent. With WebView2 being an integral part of Windows and the per-origin WebView2 prompt being configurable/suppressible by the hosting app (the intention is to allow the host to customize their consent experience), we felt strongly about tightening the experience that if Windows setting for Location is turned off, geolocation web API would not return location in WebView2. The error code you receive from the API call should reflect that you do not have permission to access location and you can react to the error message as appropriate. Windows also has certain logic in place to very selectively prompt the user about granting location consent, and the app can also handle the error as appropriate further. |
@deanmalone I will be closing this issue since it's by design. Feel free to continue the conversation, and we can always reopen the issue if it's deemed to be an issue. |
What happened?
In WebView2 Canary the
geolocation.watchPosition()
is no longer firing location updates. The success callback function is not being called.Note: It is working fine in Edge Canary.
Browsing to the following webpage demonstrates the issue.
Importance
Important. My app's user experience is significantly compromised.
Runtime Channel
Prerelease (Edge Canary/Dev/Beta)
Runtime Version
126.0.2589.0
SDK Version
1.0.1722.45
Framework
WPF
Operating System
Windows 11
OS Version
22631.3593
Repro steps
Latitude:
andLongitude:
fieldsExpected: The Latitude and Longitude coordinates are displayed.
Actual: No coordinates are displayed. The
showPosition
function is never called.Repros in Edge Browser
No, issue does not reproduce in the corresponding Edge version
Regression
Regression in newer Runtime
Last working version (if regression)
No response
The text was updated successfully, but these errors were encountered: