From eebb1df14b26b65493702c090d13e1a9c7563db6 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 25 Apr 2026 23:11:10 +0300 Subject: Fix splash screen Enter/Space key not playing chime sound The splash overlay played its chime on pointerdown (click) but not when dismissing via Enter or Space. Expose playSplashChime on window so the global keydown handler can trigger the same sound before dismissal. Escape continues to dismiss silently. --- internal/generator/templates/shared/shared.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/internal/generator/templates/shared/shared.js b/internal/generator/templates/shared/shared.js index 13c99dd..6391d6c 100644 --- a/internal/generator/templates/shared/shared.js +++ b/internal/generator/templates/shared/shared.js @@ -704,6 +704,7 @@ window._snonuxRebindHeader = bindHeaderTriggers; window._snonuxDismissSplash = dismiss; window._snonuxShowSplash = show; + window._snonuxPlaySplashChime = playSplashChime; if (document.documentElement.classList.contains('sno-splash-skip')) { dismiss(); return; @@ -1407,7 +1408,11 @@ if (tag === 'INPUT' || tag === 'TEXTAREA' || tag === 'SELECT') return; var splash = document.getElementById('splash-overlay'); if (splash && !splash.classList.contains('splash--dismissed')) { - if (e.key === 'Enter' || e.key === ' ' || e.key === 'Escape') { + if (e.key === 'Enter' || e.key === ' ') { + e.preventDefault(); + if (window._snonuxPlaySplashChime) window._snonuxPlaySplashChime(); + if (window._snonuxDismissSplash) window._snonuxDismissSplash(); + } else if (e.key === 'Escape') { e.preventDefault(); if (window._snonuxDismissSplash) window._snonuxDismissSplash(); } else if (e.key === 'w' && !e.repeat) { -- cgit v1.2.3