Merge pull request #2393 from crazyserver/MOBILE-3401

MOBILE-3401 tabs: Recalculate tab height if needed
main
Juan Leyva 2020-06-08 14:27:13 +02:00 committed by GitHub
commit 289b380e90
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -477,6 +477,11 @@ export class CoreTabsComponent implements OnInit, AfterViewInit, OnChanges, OnDe
* @param scrollElement Scroll element to check scroll position. * @param scrollElement Scroll element to check scroll position.
*/ */
showHideTabs(scrollElement: any): void { showHideTabs(scrollElement: any): void {
if (!this.tabBarHeight && this.topTabsElement.offsetHeight != this.tabBarHeight) {
// Wrong tab height, recalculate it.
this.calculateTabBarHeight();
}
if (!this.tabBarHeight) { if (!this.tabBarHeight) {
// We don't have the tab bar height, this means the tab bar isn't shown. // We don't have the tab bar height, this means the tab bar isn't shown.
return; return;