From 42f674401edc95e4250f6395bafe7748eaadca06 Mon Sep 17 00:00:00 2001 From: Michael Mayer Date: Sun, 27 Dec 2020 16:15:27 +0100 Subject: [PATCH] UX: Improve disable back button in full-screen dialogs Signed-off-by: Michael Mayer --- frontend/src/app.js | 2 +- frontend/src/share.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/app.js b/frontend/src/app.js index 35f4a4da5..6236fbd3e 100644 --- a/frontend/src/app.js +++ b/frontend/src/app.js @@ -109,7 +109,7 @@ const router = new Router({ }); router.beforeEach((to, from, next) => { - if (document.documentElement.className) { + if (document.querySelector(".v-dialog--active.v-dialog--fullscreen")) { // Disable back button in full-screen viewers and editors. next(false); } else if (to.matched.some((record) => record.meta.settings) && config.values.disable.settings) { diff --git a/frontend/src/share.js b/frontend/src/share.js index 3f8ffc907..adcea4ba2 100644 --- a/frontend/src/share.js +++ b/frontend/src/share.js @@ -109,7 +109,7 @@ const router = new Router({ }); router.beforeEach((to, from, next) => { - if (document.documentElement.className) { + if (document.querySelector(".v-dialog--active.v-dialog--fullscreen")) { // Disable back button in full-screen viewers and editors. next(false); } else if (to.matched.some((record) => record.meta.settings) && config.values.disable.settings) {