chore: focus words earlier to avoid flashing issues

This commit is contained in:
Miodec 2024-03-20 20:37:29 +01:00
parent 0b0fff939a
commit 57d9fc3b04

View file

@ -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);