From b091b90ee1ad17710324229da1f46cea86d7c832 Mon Sep 17 00:00:00 2001 From: Alfonso Salces Date: Tue, 19 Nov 2024 09:12:59 +0100 Subject: [PATCH] MOBILE-4704 navigator: Exit from full screen mode while navigate --- src/core/services/navigator.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/core/services/navigator.ts b/src/core/services/navigator.ts index 096aa1956..6632359f7 100644 --- a/src/core/services/navigator.ts +++ b/src/core/services/navigator.ts @@ -150,6 +150,13 @@ export class CoreNavigatorService { ? await NavController.navigateRoot(url, navigationOptions) : await NavController.navigateForward(url, navigationOptions); + // This is done to exit full screen if the user navigate. + if (document.exitFullscreen) { + await CorePromiseUtils.ignoreErrors(document.exitFullscreen()); + } else if (document['webkitExitFullscreen']) { + document['webkitExitFullscreen'](); + } + if (options.nextNavigation?.path && navigationResult !== false) { if (options.nextNavigation.isSitePath) { return this.navigateToSitePath(options.nextNavigation.path, options.nextNavigation.options);