From bf8c4d700799df6b059ff47eac9c8ad6705077c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Mon, 8 Jun 2020 14:21:58 +0200 Subject: [PATCH] MOBILE-3401 tabs: Recalculate tab height if needed --- src/components/tabs/tabs.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/tabs/tabs.ts b/src/components/tabs/tabs.ts index ed0910a49..65cdb3bf2 100644 --- a/src/components/tabs/tabs.ts +++ b/src/components/tabs/tabs.ts @@ -477,6 +477,11 @@ export class CoreTabsComponent implements OnInit, AfterViewInit, OnChanges, OnDe * @param scrollElement Scroll element to check scroll position. */ showHideTabs(scrollElement: any): void { + if (!this.tabBarHeight && this.topTabsElement.offsetHeight != this.tabBarHeight) { + // Wrong tab height, recalculate it. + this.calculateTabBarHeight(); + } + if (!this.tabBarHeight) { // We don't have the tab bar height, this means the tab bar isn't shown. return;