diff --git a/src/addon/mod/forum/components/index/addon-mod-forum-index.html b/src/addon/mod/forum/components/index/addon-mod-forum-index.html
index 8a7dae440..4c8be80bf 100644
--- a/src/addon/mod/forum/components/index/addon-mod-forum-index.html
+++ b/src/addon/mod/forum/components/index/addon-mod-forum-index.html
@@ -31,17 +31,17 @@
{{ availabilityMessage }}
-
-
-
-
-
-
-
+
+
+
+
+
+
+
@@ -95,9 +95,9 @@
-
-
+
+
diff --git a/src/components/tabs/tab.ts b/src/components/tabs/tab.ts
index 9006b3011..fc4aaf2fc 100644
--- a/src/components/tabs/tab.ts
+++ b/src/components/tabs/tab.ts
@@ -128,6 +128,8 @@ export class CoreTabComponent implements OnInit, OnDestroy {
});
this.tabs.showHideTabs(scroll);
+ }).catch(() => {
+ // Ignore errors.
});
}
diff --git a/src/components/tabs/tabs.ts b/src/components/tabs/tabs.ts
index 5d457bfd8..921143228 100644
--- a/src/components/tabs/tabs.ts
+++ b/src/components/tabs/tabs.ts
@@ -417,6 +417,13 @@ 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';
+ }
+
// Ensure scroll has been modified to avoid flicks.
return;
}
@@ -438,7 +445,8 @@ export class CoreTabsComponent implements OnInit, AfterViewInit, OnChanges, OnDe
this.originalTabsContainer.style.transform = 'translateY(-' + scroll + 'px)';
this.originalTabsContainer.style.paddingBottom = this.tabBarHeight - scroll + 'px';
}
- this.lastScroll = scroll;
+ // Use lastScroll after moving the tabs to avoid flickering.
+ this.lastScroll = parseInt(scrollElement.scrollTop, 10);
}
/**
diff --git a/src/core/block/components/course-blocks/course-blocks.ts b/src/core/block/components/course-blocks/course-blocks.ts
index 574dc3c8b..7db1ffa8c 100644
--- a/src/core/block/components/course-blocks/course-blocks.ts
+++ b/src/core/block/components/course-blocks/course-blocks.ts
@@ -67,6 +67,10 @@ export class CoreBlockCourseBlocksComponent implements OnInit, OnDestroy {
* Setup scrolling.
*/
protected initScroll(): void {
+ if (this.blocks.length <= 0) {
+ return;
+ }
+
const scroll: HTMLElement = this.content && this.content.getScrollElement();
this.domUtils.waitElementToExist(() => scroll && scroll.querySelector('.core-course-blocks-side')).then((sideElement) => {
@@ -89,6 +93,8 @@ export class CoreBlockCourseBlocksComponent implements OnInit, OnDestroy {
this.sideScroll.classList.remove('core-course-blocks-fixed-bottom');
this.scrollWorking = false;
}
+ }).catch(() => {
+ // Ignore errors.
});
}