style: only apply error underline when moving to the next word

This commit is contained in:
Miodec 2024-08-10 21:45:47 +02:00
parent 142b51cc26
commit 24e94479d3

View file

@ -899,14 +899,6 @@ export async function updateWordElement(inputOverride?: string): Promise<void> {
ret += `<letter>` + currentWord[i] + "</letter>";
}
}
if (Config.highlightMode === "letter") {
if (input.length > currentWord.length && !Config.blindMode) {
wordAtIndex.classList.add("error");
} else if (input.length === currentWord.length) {
wordAtIndex.classList.remove("error");
}
}
}
wordAtIndex.innerHTML = ret;