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 {
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue