Fix opening safari vc on iframe load
This commit is contained in:
parent
415340882e
commit
8e6bf219c8
|
@ -127,12 +127,12 @@ class ReadViewController: UIViewController {
|
|||
|
||||
extension ReadViewController: WKNavigationDelegate {
|
||||
func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction) async -> WKNavigationActionPolicy {
|
||||
let url = navigationAction.request.url!
|
||||
if url == item.url {
|
||||
return .allow
|
||||
} else {
|
||||
if navigationAction.navigationType == .linkActivated {
|
||||
let url = navigationAction.request.url!
|
||||
present(createSafariVC(url: url), animated: true)
|
||||
return .cancel
|
||||
} else {
|
||||
return .allow
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue