From 6a9aaefe5fa1e876cf2bebd4ab03420f0d981571 Mon Sep 17 00:00:00 2001 From: Miodec Date: Fri, 26 Dec 2025 15:01:00 +0100 Subject: [PATCH] fix test not working --- frontend/src/ts/input/handlers/keydown.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/frontend/src/ts/input/handlers/keydown.ts b/frontend/src/ts/input/handlers/keydown.ts index 174e64c87..5c58faca7 100644 --- a/frontend/src/ts/input/handlers/keydown.ts +++ b/frontend/src/ts/input/handlers/keydown.ts @@ -24,6 +24,7 @@ import { getActiveFunboxNames, } from "../../test/funbox/list"; import * as TribeState from "../../tribe/tribe-state"; +import { CLIENT_STATE } from "../../tribe/types"; export async function handleTab(e: KeyboardEvent, now: number): Promise { if (Config.quickRestart === "tab") { @@ -145,7 +146,11 @@ async function handleFunboxes( } export async function onKeydown(event: KeyboardEvent): Promise { - if (!TribeState.isRaceActive()) { + if ( + TribeState.getState() === CLIENT_STATE.CONNECTED && + TribeState.isInARoom() && + !TribeState.isRaceActive() + ) { event.preventDefault(); return; }