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); } }); }