Fix opening safari vc on iframe load

This commit is contained in:
Shadowfacts 2022-01-12 11:26:24 -05:00
parent 415340882e
commit 8e6bf219c8
1 changed files with 4 additions and 4 deletions

View File

@ -127,12 +127,12 @@ class ReadViewController: UIViewController {
extension ReadViewController: WKNavigationDelegate {
func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction) async -> WKNavigationActionPolicy {
if navigationAction.navigationType == .linkActivated {
let url = navigationAction.request.url!
if url == item.url {
return .allow
} else {
present(createSafariVC(url: url), animated: true)
return .cancel
} else {
return .allow
}
}
}