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);