From 3748c549677ed868f6c19e9eb5e6382a1a06376e Mon Sep 17 00:00:00 2001 From: 0neGal Date: Wed, 19 Jun 2024 23:58:15 +0200 Subject: prevent changing section when a popup is open --- src/app/js/launcher.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/app/js') diff --git a/src/app/js/launcher.js b/src/app/js/launcher.js index 546b647..d249d34 100644 --- a/src/app/js/launcher.js +++ b/src/app/js/launcher.js @@ -1,3 +1,4 @@ +const popups = require("./popups"); const markdown = require("marked").parse; let launcher = {}; @@ -168,6 +169,11 @@ launcher.show_ns = (section) => { // // `direction` can be: left or right launcher.relative_section = (direction) => { + // prevent switching section if a popup is open + if (popups.open_list().length) { + return; + } + // the `.contentMenu` in the currently active tab let active_menu = document.querySelector( ".contentContainer:not(.hidden) .contentMenu" -- cgit v1.2.3