MOBILE-3068 tabs: Fix scroll problem on calculating tabs

main
Pau Ferrer Ocaña 2019-08-23 10:14:28 +02:00
parent 6269849dff
commit f3a51a3717
1 changed files with 9 additions and 1 deletions

View File

@ -234,7 +234,15 @@ export class CoreTabsComponent implements OnInit, AfterViewInit, OnChanges, OnDe
*/
calculateTabBarHeight(): void {
this.tabBarHeight = this.topTabsElement.offsetHeight;
this.originalTabsContainer.style.paddingBottom = this.tabBarHeight + 'px';
if (this.tabsShown) {
// Smooth translation.
this.topTabsElement.style.transform = 'translateY(-' + this.lastScroll + 'px)';
this.originalTabsContainer.style.transform = 'translateY(-' + this.lastScroll + 'px)';
this.originalTabsContainer.style.paddingBottom = this.tabBarHeight - this.lastScroll + 'px';
} else {
this.tabBarElement.classList.add('tabs-hidden');
}
}
/**