From b8ddf8783ad1d2dd30e5fd9d522e7ac4d9e2cc56 Mon Sep 17 00:00:00 2001 From: Michal Smaga Date: Wed, 6 Nov 2024 13:25:19 +0100 Subject: [PATCH] Use WebKit delegate flow for handling opening a new tab from _blank links --- DuckDuckGo/TabViewController.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DuckDuckGo/TabViewController.swift b/DuckDuckGo/TabViewController.swift index 94a89dec38..033233bb8b 100644 --- a/DuckDuckGo/TabViewController.swift +++ b/DuckDuckGo/TabViewController.swift @@ -1974,8 +1974,8 @@ extension TabViewController: WKNavigationDelegate { } if isNewTargetBlankRequest(navigationAction: navigationAction) { - delegate?.tab(self, didRequestNewTabForUrl: url, openedByPage: true, inheritingAttribution: adClickAttributionLogic.state) - completion(.cancel) + // Continue loading as WKUIDelegate callback will handle opening a new tab in TabViewController.webView(_:createWebViewWith:for:windowFeatures:) + completion(.allow) return }