diff --git a/public/js/quickmenu/events.js b/public/js/quickmenu/events.js index 9ebb281..4711992 100644 --- a/public/js/quickmenu/events.js +++ b/public/js/quickmenu/events.js @@ -139,8 +139,14 @@ export async function loadEvents() { document.addEventListener("keydown", e => { if (e.key === "Escape") { + // Booster aktiv & noch nicht fertig → ESC komplett blockieren + if (boosterUi.style.display !== "none" && (!allRevealed || isSpinning)) { + e.stopPropagation(); + e.preventDefault(); + return; + } overlay.classList.remove("active"); - if (!isSpinning && allRevealed) { // ← ESC im Booster nur wenn fertig + if (!isSpinning && allRevealed) { eventsGrid.style.display = ""; boosterUi.style.display = "none"; clearAllIntervals(); @@ -176,6 +182,7 @@ export async function loadEvents() { clearAllIntervals(); isSpinning = false; allRevealed = false; + window.__boosterLocked = false; for (let i = 0; i < 5; i++) { const inner = body.querySelector(`#booster-slot-${i} .booster-slot-inner`); @@ -236,6 +243,7 @@ export async function loadEvents() { if (!allCards.length) return; isSpinning = true; + window.__boosterLocked = true; // äußere Modals sperren const stapel = body.querySelector("#booster-stapel"); stapel.classList.add("used"); @@ -287,6 +295,7 @@ export async function loadEvents() { } allRevealed = true; + window.__boosterLocked = false; // äußere Modals wieder freigeben body.querySelector("#booster-hint").textContent = "Alle Karten erhalten! ✓"; const backBtn = body.querySelector("#booster-back-btn"); backBtn.style.opacity = "1";