diff --git a/kolibri/plugins/learn/assets/src/views/TopicsContentPage.vue b/kolibri/plugins/learn/assets/src/views/TopicsContentPage.vue index e6d1bba90d4..46c7fcff04d 100644 --- a/kolibri/plugins/learn/assets/src/views/TopicsContentPage.vue +++ b/kolibri/plugins/learn/assets/src/views/TopicsContentPage.vue @@ -462,10 +462,22 @@ } }, showViewResourcesSidePanel(newVal, oldVal) { + if (newVal === true) { + this.stopMainScroll(true); + } else { + this.stopMainScroll(false); + } if (newVal && !oldVal) { this.getSidebarInfo(); } }, + sidePanelContent(newVal) { + if (newVal !== null) { + this.stopMainScroll(true); + } else { + this.stopMainScroll(false); + } + }, }, created() { this.initializeState(); @@ -645,6 +657,14 @@ goToAllLibraries() { this.$router.push({ name: PageNames.EXPLORE_LIBRARIES }); }, + stopMainScroll(sidePanelVisible) { + const mainWrapperElement = this.$refs.mainWrapper; + if (sidePanelVisible) { + mainWrapperElement.style.position = 'fixed'; + } else { + mainWrapperElement.style.position = null; + } + }, }, $trs: { kolibriTitleMessage: {