diff --git a/php/index.php b/php/index.php index ed46e73..f65558c 100644 --- a/php/index.php +++ b/php/index.php @@ -2065,6 +2065,10 @@ function draw() { // ============ ВВОД ============ const keys = {}; window.addEventListener('keydown', e => { + // фокус в текстовом поле (например, ввод имени) — не перехватываем хоткеи, + // иначе R/N/P/F/G/W/A/S/D и стрелки режут буквы прямо во время печати + if (document.activeElement && document.activeElement.tagName === 'INPUT') return; + const key = e.key.toLowerCase(); if (key === 'escape' && (solveState || pendingSolution)) { cancelAutoSolve(); e.preventDefault(); return; }