Skip to content

Commit

Permalink
ensure we unset the sidepanelisopen var when screensize changes
Browse files Browse the repository at this point in the history
  • Loading branch information
nucleogenesis committed Nov 13, 2024
1 parent b30f7c5 commit c673a02
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions kolibri/plugins/learn/assets/src/views/LibraryPage/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,14 @@
searchTerms() {
this.mobileSidePanelIsOpen = false;
},
windowIsLarge(newVal) {
// Be sure we set the side panel closed if the screen size changes
// otherwise the watcher on mobileSidePanelIsOpen will leave the
// document stuck in `position: fixed;` so we won't see the scrollbar
if (newVal) {
this.mobileSidePanelIsOpen = false;
}
},
mobileSidePanelIsOpen() {
if (this.mobileSidePanelIsOpen) {
document.documentElement.style.position = 'fixed';
Expand Down

0 comments on commit c673a02

Please sign in to comment.