Merge pull request #2305 from dpalou/MOBILE-3356
MOBILE-3356 core: Fix number of tabs calculation on course pagemain
commit
416ecbb704
|
@ -211,7 +211,9 @@ export class CoreTabsComponent implements OnInit, AfterViewInit, OnChanges, OnDe
|
||||||
this.tabs.push(tab);
|
this.tabs.push(tab);
|
||||||
this.sortTabs();
|
this.sortTabs();
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
this.calculateSlides();
|
this.calculateSlides();
|
||||||
|
});
|
||||||
|
|
||||||
if (this.initialized && this.tabs.length > 1 && this.tabBarHeight == 0) {
|
if (this.initialized && this.tabs.length > 1 && this.tabBarHeight == 0) {
|
||||||
// Calculate the tabBarHeight again now that there is more than 1 tab and the bar will be seen.
|
// Calculate the tabBarHeight again now that there is more than 1 tab and the bar will be seen.
|
||||||
|
@ -383,7 +385,7 @@ export class CoreTabsComponent implements OnInit, AfterViewInit, OnChanges, OnDe
|
||||||
}
|
}
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.updateAriaHidden(); // Slide's update() sets aria-hidden to true, update it.
|
this.slideChanged(); // Call slide changed again, sometimes the slide active index takes a while to be updated.
|
||||||
}, 400);
|
}, 400);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue