From 17681e62fbdc09a0b07ba2c148e536c49bac98cc Mon Sep 17 00:00:00 2001 From: Claude Dev Date: Mon, 23 Mar 2026 22:31:12 +0100 Subject: [PATCH] Tutorial: Modals automatisch schliessen bei Zurueck-Navigation _enterStep schliesst alle offenen Modals wenn der neue Step kein Modal-Step ist. Verhindert Blur auf Seitenleiste und haengengebliebene Modals bei Rueckwaerts-Navigation (z.B. Schritt 4 -> 2). --- src/static/js/tutorial.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/static/js/tutorial.js b/src/static/js/tutorial.js index aa32180..dd558c5 100644 --- a/src/static/js/tutorial.js +++ b/src/static/js/tutorial.js @@ -1374,6 +1374,17 @@ const Tutorial = { // Bei Modal-Steps: Spotlight ausblenden (Modal hat eigene Abdunkelung) var isModalStep = step.target && (step.target.indexOf('#modal-') !== -1); + // Wenn kein Modal-Step: offene Modals schliessen (z.B. bei Zurueck-Navigation) + if (!isModalStep) { + ['modal-new', 'modal-sources'].forEach(function(id) { + var overlay = document.getElementById(id); + if (overlay && overlay.classList.contains('active')) { + overlay.classList.remove('active'); + overlay.style.zIndex = ''; + } + }); + } + if (step.target && step.position !== 'center' && !isModalStep) { await this._scrollToTarget(step.target); this._spotlightElement(step.target);