From cf0a4999e93ffc3b6595261394c46eb609673083 Mon Sep 17 00:00:00 2001 From: Pavel Djundik Date: Sun, 1 Dec 2019 20:20:37 +0200 Subject: [PATCH] Fix sidebar not opening when lounge is open in a background tab --- client/components/App.vue | 2 +- client/js/vue.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/components/App.vue b/client/components/App.vue index 09841cde..18a10134 100644 --- a/client/components/App.vue +++ b/client/components/App.vue @@ -70,7 +70,7 @@ export default { return tommorow - today; }, prepareOpenStates() { - const viewportWidth = window.outerWidth; + const viewportWidth = window.innerWidth; let isUserlistOpen = storage.get("thelounge.state.userlist"); if (viewportWidth > constants.mobileViewportPixels) { diff --git a/client/js/vue.js b/client/js/vue.js index 7f024ec7..f27b52da 100644 --- a/client/js/vue.js +++ b/client/js/vue.js @@ -69,7 +69,7 @@ const vueApp = new Vue({ store.watch( (state) => state.sidebarOpen, (sidebarOpen) => { - if (window.outerWidth > constants.mobileViewportPixels) { + if (window.innerWidth > constants.mobileViewportPixels) { storage.set("thelounge.state.sidebar", sidebarOpen); vueApp.$emit("resize"); }