From 8ce353832e9538bf72b9a60a5235638858987d31 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Mon, 24 Oct 2022 09:51:24 +0200 Subject: [PATCH] MOBILE-4081 core: Only show warning if http --- src/core/singletons/window.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/singletons/window.ts b/src/core/singletons/window.ts index d4033f95f..089938fb9 100644 --- a/src/core/singletons/window.ts +++ b/src/core/singletons/window.ts @@ -55,6 +55,11 @@ export class CoreWindow { * @return Promise resolved if confirmed, rejected if rejected. */ static async confirmOpenBrowserIfNeeded(url: string): Promise { + if (!CoreUrlUtils.isHttpURL(url)) { + // Only ask confirm for http(s), other cases usually launch external apps. + return; + } + // Check if the user decided not to see the warning. const dontShowWarning = await CoreConfig.get(CoreConstants.SETTINGS_DONT_SHOW_EXTERNAL_LINK_WARN, 0); if (dontShowWarning) {