From 6290fb99afb4214b51db821558f85b911825b657 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Fri, 13 Sep 2024 14:33:02 +0200 Subject: [PATCH] MOBILE-4657 tabs: Fix detection of nav bar buttons to hide All course option site plugins use the same page name, so using page name to check if a page is selected caused problems. It's better to use the tab ID --- src/core/components/tabs-outlet/tabs-outlet.ts | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/core/components/tabs-outlet/tabs-outlet.ts b/src/core/components/tabs-outlet/tabs-outlet.ts index 92c2d696d..076e3963f 100644 --- a/src/core/components/tabs-outlet/tabs-outlet.ts +++ b/src/core/components/tabs-outlet/tabs-outlet.ts @@ -106,7 +106,7 @@ export class CoreTabsOutletComponent extends CoreTabsBaseComponent { this.lastActiveComponent = this.ionTabs.outlet.component; @@ -206,17 +206,15 @@ export class CoreTabsOutletComponent extends CoreTabsBaseComponent { const instance = CoreDirectivesRegistry.resolve(element, CoreNavBarButtonsComponent); if (instance) { - const pagetagName = element.closest('.ion-page')?.tagName; - instance.forceHide(activatedPageName != pagetagName); + const pageTabId = element.closest('.ion-page')?.id; + instance.forceHide(this.selected !== pageTabId); } }); }