Bug 258726

Summary: navigator.permissions.query for geolocation reporting wrong value
Product: WebKit Reporter: Alexander Berner <a.berner>
Component: WebCore Misc.Assignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: ap, cdumez, marcosc, thorsten, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: Safari 16   
Hardware: iPhone / iPad   
OS: iOS 16   

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'.