From 57d9fc3b04bad5e99a1663d07e276bd8b4e7aca6 Mon Sep 17 00:00:00 2001 From: Miodec Date: Wed, 20 Mar 2024 20:37:29 +0100 Subject: [PATCH] chore: focus words earlier to avoid flashing issues --- frontend/src/ts/test/test-logic.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/ts/test/test-logic.ts b/frontend/src/ts/test/test-logic.ts index fdb02aad3195..67395dc32c5f 100644 --- a/frontend/src/ts/test/test-logic.ts +++ b/frontend/src/ts/test/test-logic.ts @@ -376,6 +376,7 @@ export function restart(options = {} as RestartOptions): void { const isWordsFocused = $("#wordsInput").is(":focus"); if (isWordsFocused) OutOfFocus.hide(); + TestUI.focusWords(); $("#typingTest") .css("opacity", 0) @@ -405,7 +406,6 @@ export function restart(options = {} as RestartOptions): void { "0"; TestUI.setTestRestarting(false); - TestUI.focusWords(); TestUI.updatePremid(); ManualRestart.reset(); PageTransition.set(false);