fix: reset input state when restarting typing game

pull/1799/head
Kumari Vaishnavi 1 week ago committed by GitHub
parent 5f220217d3
commit dc8e9c27be
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -54,11 +54,13 @@ const startGame = () => {
wordIndex = 0;
renderQuote(quote);
messageElement.textContent = messages.start;
typedValueElement.value = "";
typedValueElement.focus();
messageElement.textContent = messages.start;
typedValueElement.value = "";
typedValueElement.disabled = false;
typedValueElement.classList.remove("error");
typedValueElement.focus();
startTime = Date.now();
startTime = Date.now();
};
// Typing logic

Loading…
Cancel
Save