From d17d368d66fbb11894a3b473acb8741b2cc2804a Mon Sep 17 00:00:00 2001 From: Jacob Pierce Date: Wed, 18 May 2022 11:15:22 -0700 Subject: [PATCH] undo change to html.style.position to fixed when destroying TopicsPage --- kolibri/plugins/learn/assets/src/views/TopicsPage.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kolibri/plugins/learn/assets/src/views/TopicsPage.vue b/kolibri/plugins/learn/assets/src/views/TopicsPage.vue index ff76554d027..3a35db8a898 100644 --- a/kolibri/plugins/learn/assets/src/views/TopicsPage.vue +++ b/kolibri/plugins/learn/assets/src/views/TopicsPage.vue @@ -666,6 +666,7 @@ }, sidePanelContent() { if (this.sidePanelContent) { + // Ensure the content underneath isn't scrolled - unset this when destroyed document.documentElement.style.position = 'fixed'; return; } @@ -674,6 +675,8 @@ }, beforeDestroy() { window.removeEventListener('scroll', this.throttledHandleScroll); + // Unsetting possible change in sidePanelContent watcher to avoid leaving `fixed` position + document.documentElement.style.position = ''; }, created() { this.translator = crossComponentTranslator(LibraryPage);