diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index d879edc585..dffa9b0106 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -165,7 +165,7 @@ { "identity" : "trackerradarkit", "kind" : "remoteSourceControl", - "location" : "https://github.com/duckduckgo/TrackerRadarKit.git", + "location" : "https://github.com/duckduckgo/TrackerRadarKit", "state" : { "revision" : "a6b7ba151d9dc6684484f3785293875ec01cc1ff", "version" : "1.2.2" diff --git a/DuckDuckGo/MainViewController.swift b/DuckDuckGo/MainViewController.swift index d125eaccaf..41df7f48c2 100644 --- a/DuckDuckGo/MainViewController.swift +++ b/DuckDuckGo/MainViewController.swift @@ -1833,7 +1833,8 @@ extension MainViewController: TabDelegate { showBars() currentTab?.dismiss() - let newTab = tabManager.addURLRequest(navigationAction.request, + // Don't use a request or else the page gets stuck on "about:blank" + let newTab = tabManager.addURLRequest(nil, with: configuration, inheritedAttribution: inheritingAttribution) newTab.openedByPage = true diff --git a/DuckDuckGo/TabManager.swift b/DuckDuckGo/TabManager.swift index 39e2629895..68a8fa473a 100644 --- a/DuckDuckGo/TabManager.swift +++ b/DuckDuckGo/TabManager.swift @@ -120,7 +120,7 @@ class TabManager { return current(createIfNeeded: true)! } - func addURLRequest(_ request: URLRequest, + func addURLRequest(_ request: URLRequest?, with configuration: WKWebViewConfiguration, inheritedAttribution: AdClickAttributionLogic.State?) -> TabViewController { @@ -128,7 +128,12 @@ class TabManager { fatalError("Failed to copy configuration") } - let tab = Tab(link: request.url == nil ? nil : Link(title: nil, url: request.url!)) + let tab: Tab + if let request { + tab = Tab(link: request.url == nil ? nil : Link(title: nil, url: request.url!)) + } else { + tab = Tab() + } model.insert(tab: tab, at: model.currentIndex + 1) model.select(tabAt: model.currentIndex + 1)