Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Fix SMS/Tel/Mail not working.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon-T committed Nov 29, 2023
1 parent aac7edf commit a1586a5
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,11 @@ extension BrowserViewController: WKNavigationDelegate {
// Do not allow opening external URLs from child tabs
return await withCheckedContinuation { continuation in
handleExternalURL(requestURL, tab: tab, navigationAction: navigationAction) { shouldOpen in
if UIApplication.shared.canOpenURL(requestURL) {
UIApplication.shared.open(requestURL)
continuation.resume(returning: (.cancel, preferences))
return
}
continuation.resume(returning: (shouldOpen ? .allow : .cancel, preferences))
}
}
Expand All @@ -195,6 +200,11 @@ extension BrowserViewController: WKNavigationDelegate {
// Do not allow opening external URLs from child tabs
return await withCheckedContinuation { continuation in
handleExternalURL(mapsURL.url, tab: tab, navigationAction: navigationAction) { shouldOpen in
if UIApplication.shared.canOpenURL(requestURL) {
UIApplication.shared.open(requestURL)
continuation.resume(returning: (.cancel, preferences))
return
}
continuation.resume(returning: (shouldOpen ? .allow : .cancel, preferences))
}
}
Expand All @@ -204,6 +214,11 @@ extension BrowserViewController: WKNavigationDelegate {
// Do not allow opening external URLs from child tabs
return await withCheckedContinuation { continuation in
handleExternalURL(requestURL, tab: tab, navigationAction: navigationAction) { shouldOpen in
if UIApplication.shared.canOpenURL(requestURL) {
UIApplication.shared.open(requestURL)
continuation.resume(returning: (.cancel, preferences))
return
}
continuation.resume(returning: (shouldOpen ? .allow : .cancel, preferences))
}
}
Expand All @@ -214,6 +229,11 @@ extension BrowserViewController: WKNavigationDelegate {
// Do not allow opening external URLs from child tabs
return await withCheckedContinuation { continuation in
handleExternalURL(requestURL, tab: tab, navigationAction: navigationAction) { shouldOpen in
if UIApplication.shared.canOpenURL(requestURL) {
UIApplication.shared.open(requestURL)
continuation.resume(returning: (.cancel, preferences))
return
}
continuation.resume(returning: (shouldOpen ? .allow : .cancel, preferences))
}
}
Expand Down Expand Up @@ -428,6 +448,11 @@ extension BrowserViewController: WKNavigationDelegate {
self.present(alert, animated: true, completion: nil)
}

if UIApplication.shared.canOpenURL(requestURL) {
UIApplication.shared.open(requestURL)
continuation.resume(returning: (.cancel, preferences))
return
}
continuation.resume(returning: (shouldOpen ? .allow : .cancel, preferences))
}
}
Expand Down

0 comments on commit a1586a5

Please sign in to comment.