From 68ebc28996753427fdb99db78354c6f5ed4b5e96 Mon Sep 17 00:00:00 2001 From: James Magahern Date: Tue, 5 Jan 2021 14:53:21 -0800 Subject: [PATCH] Only open in new tab if navigation action type is link clicked --- App/Browser View/BrowserViewController.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/App/Browser View/BrowserViewController.swift b/App/Browser View/BrowserViewController.swift index 8015c93..eb23aa7 100644 --- a/App/Browser View/BrowserViewController.swift +++ b/App/Browser View/BrowserViewController.swift @@ -440,7 +440,7 @@ class BrowserViewController: UIViewController, WKNavigationDelegate, WKUIDelegat func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, preferences: WKWebpagePreferences, decisionHandler: @escaping (WKNavigationActionPolicy, WKWebpagePreferences) -> Void) { // Handle command+click - if commandKeyHeld { + if commandKeyHeld && navigationAction.navigationType == .linkActivated { // Cancel navigation in this tab decisionHandler(.cancel, preferences)