Bug 258726 - navigator.permissions.query for geolocation reporting wrong value
Summary: navigator.permissions.query for geolocation reporting wrong value
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: Safari 16
Hardware: iPhone / iPad iOS 16
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2023-06-30 06:35 PDT by Alexander Berner
Modified: 2024-06-17 06:33 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Berner 2023-06-30 06:35:07 PDT
After denying the geolocation after calling navigator.geolocation.getCurrentPosition navigator.permissions.query({name: "geolocation"}) still reports "prompt" instead of denied.

Expected result would be "denied"
Comment 1 Alexey Proskuryakov 2023-06-30 23:06:24 PDT
I think this may intentional, but CC'ing people who will know for certain.
Comment 2 Radar WebKit Bug Importer 2023-07-07 06:36:15 PDT
<rdar://problem/111905576>
Comment 3 Alexander Berner 2023-07-16 12:53:21 PDT
Any news if this is behavior is intentional?
Comment 4 Marcos Caceres 2023-11-19 19:03:40 PST
Sorry for the delay. I'm not sure if this is intentional. It should be intentional on initial load of a document, so to not reveal a user preference. However, after an explicit denial from the user, it should probably return "denied".
Comment 5 Luca Passariello 2024-05-19 04:14:38 PDT
Hi, sorry to stick my nose in, but this is also the case for the opposite scenario. In the current version of Safari (on iOS 17.4.1) when requesting permission and accepting, the status never updates to granted. Even though you do not need to prompt again for the location.

It will update to granted if the user has their global setting as 'allow' instead of 'ask'.