aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author0neGal <mail@0negal.com>2024-06-19 23:58:15 +0200
committer0neGal <mail@0negal.com>2024-06-19 23:58:15 +0200
commit3748c549677ed868f6c19e9eb5e6382a1a06376e (patch)
treeff65433fc9349939fad9e02da2fa1a45ea8ec4c4
parent3c164a36cb8104853b7272d3de2f85057af28a49 (diff)
downloadViper-3748c549677ed868f6c19e9eb5e6382a1a06376e.tar.gz
Viper-3748c549677ed868f6c19e9eb5e6382a1a06376e.zip
prevent changing section when a popup is open
-rw-r--r--src/app/js/launcher.js6
1 files changed, 6 insertions, 0 deletions
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"