From f34c95c15b80c6ec5c342b935cf28caf06826393 Mon Sep 17 00:00:00 2001 From: MarekWo Date: Fri, 5 Jun 2026 21:35:23 +0200 Subject: [PATCH] fix(analyzer): dim Settings backdrop behind nested analyzer modals Bootstrap stacks backdrops at z-index 1050, which falls below the open Settings modal at 1055. Without bumping it, the Add analyzer and chooser modals appeared without a visible backdrop. Mirror the coordPickerModal fix by raising the latest backdrop to 1075 on shown.bs.modal. Co-Authored-By: Claude Opus 4.7 --- app/static/js/app.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/app/static/js/app.js b/app/static/js/app.js index ee4a045..2701bc5 100644 --- a/app/static/js/app.js +++ b/app/static/js/app.js @@ -3035,6 +3035,16 @@ function substituteAnalyzerUrl(template, packetHash) { return (template || '').replaceAll(ANALYZER_PLACEHOLDER, packetHash || ''); } +// Bootstrap stacks modal backdrops at z-index 1050 by default, which sits +// below an already-open modal (1055). Bump the latest backdrop above the +// underlying modal so our stacked dialog actually dims the page. +function _bumpAnalyzerBackdrop() { + const backdrops = document.querySelectorAll('.modal-backdrop'); + if (backdrops.length > 0) { + backdrops[backdrops.length - 1].style.zIndex = '1075'; + } +} + async function loadAnalyzers() { try { const resp = await fetch('/api/analyzers'); @@ -3147,6 +3157,7 @@ function openAnalyzerEditModal(id) { disabledEl.checked = false; } + modalEl.addEventListener('shown.bs.modal', _bumpAnalyzerBackdrop, { once: true }); bootstrap.Modal.getOrCreateInstance(modalEl).show(); } @@ -3337,6 +3348,7 @@ function openAnalyzerChooser(packetHash, enabled) { }, { once: true }); }); + modalEl.addEventListener('shown.bs.modal', _bumpAnalyzerBackdrop, { once: true }); modal.show(); }