diff --git a/apps/web/src/components/practice/ActiveSession.tsx b/apps/web/src/components/practice/ActiveSession.tsx index 381ebf02..b4a1ae7b 100644 --- a/apps/web/src/components/practice/ActiveSession.tsx +++ b/apps/web/src/components/practice/ActiveSession.tsx @@ -971,6 +971,13 @@ export function ActiveSession({ // Track last resume time to reset auto-pause timer after resuming const lastResumeTimeRef = useRef(0) + const handleDigitWithTimerReset = useCallback( + (digit: string) => { + lastResumeTimeRef.current = Date.now() + handleDigit(digit) + }, + [handleDigit] + ) // Reset dismissed states when help context changes (new help session) useEffect(() => { @@ -1306,7 +1313,7 @@ export function ActiveSession({ e.preventDefault() handleSubmit() } else if (/^[0-9]$/.test(e.key)) { - handleDigit(e.key) + handleDigitWithTimerReset(e.key) } } @@ -1316,7 +1323,7 @@ export function ActiveSession({ hasPhysicalKeyboard, canAcceptInput, handleSubmit, - handleDigit, + handleDigitWithTimerReset, handleBackspace, showHelpOverlay, exitHelpMode, @@ -1886,7 +1893,7 @@ export function ActiveSession({ {/* On-screen keypad for mobile - includes submit button */} {showOnScreenKeypad && (