From eab3673f26d78336194d42319d41158d46ef3bdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?= Date: Thu, 23 Jan 2020 10:56:51 +0100 Subject: [PATCH] MOBILE-3262 tabs: Ensure tabbar is shown on top scroll --- src/components/tabs/tabs.ts | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/components/tabs/tabs.ts b/src/components/tabs/tabs.ts index 578367399..3674faf59 100644 --- a/src/components/tabs/tabs.ts +++ b/src/components/tabs/tabs.ts @@ -420,14 +420,18 @@ export class CoreTabsComponent implements OnInit, AfterViewInit, OnChanges, OnDe } const scroll = parseInt(scrollElement.scrollTop, 10); - if (scroll == this.lastScroll) { - if (scroll == 0) { - // Ensure tabbar is shown. - this.topTabsElement.style.transform = ''; - this.originalTabsContainer.style.transform = ''; - this.originalTabsContainer.style.paddingBottom = this.tabBarHeight + 'px'; - } + if (scroll == 0) { + // Ensure tabbar is shown. + this.topTabsElement.style.transform = ''; + this.originalTabsContainer.style.transform = ''; + this.originalTabsContainer.style.paddingBottom = this.tabBarHeight + 'px'; + this.tabBarElement.classList.remove('tabs-hidden'); + this.tabsShown = true; + return; + } + + if (scroll == this.lastScroll) { // Ensure scroll has been modified to avoid flicks. return; }