From 8b41e8610b444e91bf1a73ab57d4e87eb5c2542e Mon Sep 17 00:00:00 2001 From: Soner YUKSEL Date: Thu, 7 Dec 2023 13:27:20 -0500 Subject: [PATCH] Ref #7835, #8494: Fix handling of External URL when in third-party frames but active tab #8495 (#8532) --- .../BrowserViewController+WKNavigationDelegate.swift | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Sources/Brave/Frontend/Browser/BrowserViewController/BrowserViewController+WKNavigationDelegate.swift b/Sources/Brave/Frontend/Browser/BrowserViewController/BrowserViewController+WKNavigationDelegate.swift index e68bc9c1ff5..11968302b83 100644 --- a/Sources/Brave/Frontend/Browser/BrowserViewController/BrowserViewController+WKNavigationDelegate.swift +++ b/Sources/Brave/Frontend/Browser/BrowserViewController/BrowserViewController+WKNavigationDelegate.swift @@ -892,12 +892,8 @@ extension BrowserViewController { } } popup.addButton(title: Strings.openExternalAppURLAllow, type: .primary) { [weak tab] () -> PopupViewDismissType in - if UIApplication.shared.canOpenURL(url) { - UIApplication.shared.open(url, options: [:]) { didOpen in - openedURLCompletionHandler(!didOpen) - } - } else { - openedURLCompletionHandler(true) + UIApplication.shared.open(url, options: [:]) { didOpen in + openedURLCompletionHandler(!didOpen) } removeTabIfEmpty() tab?.isExternalAppAlertPresented = false