WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED DUPLICATE of
bug 293089
275950
Geolocation Permissions API on iOS reports state of "Other Websites" instead of current domain if both set
https://bugs.webkit.org/show_bug.cgi?id=275950
Summary
Geolocation Permissions API on iOS reports state of "Other Websites" instead ...
smoser
Reported
2024-06-27 04:57:54 PDT
Using
https://permission.site/permission-status
, I tested the behavior of the permission API on iOS in regards to how the setting of "Other Websites" is respected. I took these steps: 1. Enable Location Services in iOS settings 2. Enable Location Services for Safari in settings 3. Safari Settings -> Location -> Edit -> Clear all domain specific settings 4. Safari Settings -> Location -> Other Websites -> Set to "Allow" 5. Visit
https://permission.site/permission-status
in Safari 6. Observe that permission status is reported as GRANTED 7. Click on Geolocation reports SUCCESS without visible prompt 8. Website Settings -> Location -> Set to "Deny" 9. Observe that the permission status is reported as GRANTED 10. Reload the page 11. Observe that the permission status is reported as GRANTED 12. Click on Geolocation reports "User denied geolocation" without visible prompt Expected behavior In step 9 and 11, `navigator.permissions.query({ name: 'geolocation' })` reports the site-specific permission status, i.e. "Permission Status" reports `DENIED` Observed behavior: Despite there being an origin-specific setting, in step 9 and 11, `navigator.permissions.query({ name: 'geolocation' })`, i.e. "Permission Status" reports `GRANTED`. This is in conflict with the behavior of the geolocation API failing in step 12. We want to provide a consistent end-to-end experience between content-area UI and browser-side UX. To do that, we need to understand how the browser UX will behave if (for example) we call the browser’s geolocation API -- will a permission prompt be shown? Or is the permission already granted or denied?
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2024-07-04 04:58:13 PDT
<
rdar://problem/131116162
>
rupin
Comment 2
2025-05-27 10:12:45 PDT
This is indeed a bug. The Permissions API should reported the site-specific permission status. We also believe the Permissions API should only return the true permissions state of the Geolocation if the site has requested to use the Geolocation API since the page load. So the correct behavior here is: In the case where the Safari setting is DENIED, navigator.permissions.query({ name: 'geolocation' }) will report DENIED BUT only after the page attempts to use the Geolocation API again (call getCurrentLocation for example). Until the site does that, navigator.permissions.query({ name: 'geolocation' }) will report PROMPT This was fixed in
https://bugs.webkit.org/show_bug.cgi?id=293089
as well as a different change in another repository.
rupin
Comment 3
2025-06-06 19:42:55 PDT
*** This bug has been marked as a duplicate of
bug 293089
***
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug