From 0c3ceca486ccb5e359a97e885b1dbb70217bd432 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Wed, 28 Jul 2021 10:22:22 +0200 Subject: [PATCH] MOBILE-3715 iab: Fix load previous page after open external app --- src/app/app.component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 18a5360d3..038345fff 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -110,6 +110,7 @@ export class AppComponent implements OnInit, AfterViewInit { // Check URLs loaded in any InAppBrowser. CoreEvents.on(CoreEvents.IAB_LOAD_START, (event) => { // URLs with a custom scheme can be prefixed with "http://" or "https://", we need to remove this. + const protocol = CoreUrlUtils.getUrlProtocol(event.url); const url = event.url.replace(/^https?:\/\//, ''); if (CoreCustomURLSchemes.isCustomURL(url)) { @@ -135,7 +136,7 @@ export class AppComponent implements OnInit, AfterViewInit { CoreUtils.closeInAppBrowser(); } } else { - this.lastInAppUrl = url; + this.lastInAppUrl = protocol ? `${protocol}://${url}` : url; } } });