Skip to content

Commit e8a2af4

Browse files
authored
Merge pull request #2527 from dpalou/MOBILE-3464
MOBILE-3464 tabs: Add a setTimeout to get the right height in iOS
2 parents fd9b79a + f4af4de commit e8a2af4

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/components/tabs/tabs.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export class CoreTabsComponent implements OnInit, AfterViewInit, OnChanges, OnDe
132132
this.initializeTabs();
133133
}
134134

135-
this.resizeFunction = this.calculateSlides.bind(this);
135+
this.resizeFunction = this.windowResized.bind(this);
136136

137137
window.addEventListener('resize', this.resizeFunction);
138138
}
@@ -632,6 +632,15 @@ export class CoreTabsComponent implements OnInit, AfterViewInit, OnChanges, OnDe
632632
});
633633
}
634634

635+
/**
636+
* Adapt tabs to a window resize.
637+
*/
638+
protected windowResized(): void {
639+
setTimeout(() => {
640+
this.calculateSlides();
641+
});
642+
}
643+
635644
/**
636645
* Component destroyed.
637646
*/

0 commit comments

Comments
 (0)