diff --git a/frontend/src/ts/controllers/input-controller.ts b/frontend/src/ts/controllers/input-controller.ts index ec6f6e60f..859b54f54 100644 --- a/frontend/src/ts/controllers/input-controller.ts +++ b/frontend/src/ts/controllers/input-controller.ts @@ -267,8 +267,14 @@ async function handleSpace(): Promise { return; } PaceCaret.handleSpace(false, currentWord); + if (Config.blindMode) { + if (Config.highlightMode !== "off") { + TestUI.highlightAllLettersAsCorrect(TestUI.currentWordElementIndex); + } + } else { + TestUI.highlightBadWord(TestUI.currentWordElementIndex); + } TestInput.input.pushHistory(); - TestUI.highlightBadWord(TestUI.currentWordElementIndex, !Config.blindMode); TestWords.words.increaseCurrentIndex(); Funbox.toggleScript(TestWords.words.getCurrent()); TestInput.incrementKeypressCount(); diff --git a/frontend/src/ts/test/test-ui.ts b/frontend/src/ts/test/test-ui.ts index 5bd4c8f6c..94512e7f9 100644 --- a/frontend/src/ts/test/test-ui.ts +++ b/frontend/src/ts/test/test-ui.ts @@ -1408,11 +1408,16 @@ export async function applyBurstHeatmap(): Promise { } } -export function highlightBadWord(index: number, showError: boolean): void { - if (!showError) return; +export function highlightBadWord(index: number): void { $($("#words .word")[index] as HTMLElement).addClass("error"); } +export function highlightAllLettersAsCorrect(wordIndex: number): void { + $($("#words .word")[wordIndex] as HTMLElement) + .find("letter") + .addClass("correct"); +} + export function highlightMode(mode?: SharedTypes.Config.HighlightMode): void { const existing = $("#words")