Bug 255936 - REGRESSION [iOS] 16.4 Unable to get location information/permission prompt via WKWebview if viewcontroller is presented modally
Summary: REGRESSION [iOS] 16.4 Unable to get location information/permission prompt vi...
Status: RESOLVED DUPLICATE of bug 255133
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: WebKit Nightly Build
Hardware: iPhone / iPad iOS 16
: P2 Critical
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-25 11:09 PDT by Saurabh Davala
Modified: 2023-04-25 19:05 PDT (History)
3 users (show)

See Also:


Attachments
Screenshot of location prompt shown prior to 16.4 (249.53 KB, image/png)
2023-04-25 11:09 PDT, Saurabh Davala
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Saurabh Davala 2023-04-25 11:09:23 PDT
Created attachment 466079 [details]
Screenshot of location prompt shown prior to 16.4

Background:
- Before iOS 16.4 calling navigator.geolocation.getCurrentPosition(...) will present the permission prompt dialog.
- In iOS 16.4 if a WKWebView is presented modally, calling navigator.geolocation.getCurrentPosition(...) does not bring up this prompt. As a result user's are unable to get location information via WKWebViews. (Please see attachment of prompt screenshot)
- As a result, this regression in uOS 16.4 is blocking user's who rely on Salesforce iOS App, and have web components which request location via navigator.geolocation.getCurrentPosition(...) since permission is never granted

To reproduce:
- Present a ViewController containing a WKWebView modally. Open a website which requests location information, or via the Safari debugger console invoke: navigator.geolocation.getCurrentPosition(...) and observe permission modal never appears

Similar cases have been reported via the developer forums, with no current official workarounds
- https://developer.apple.com/forums/thread/727174
- https://developer.apple.com/forums/thread/728248
Comment 1 Saurabh Davala 2023-04-25 11:11:07 PDT
- From the github webkit issues we noticed this PR: https://github.com/WebKit/WebKit/pull/12489 which has been merged
- Would the referenced PR resolve the issue described in the reported bug, and if so which version of iOS will this be available in.
Comment 2 Chris Dumez 2023-04-25 19:05:29 PDT
Yes, this is a dupe of Bug 255133. It has been fixed. We understand this is a bad regression and are working to ship this as soon as possible. However, Apple does not comment on when a particular fix will ship or in which version.

*** This bug has been marked as a duplicate of bug 255133 ***