diff --git a/frontend/src/ts/controllers/input-controller.ts b/frontend/src/ts/controllers/input-controller.ts index 0240b9b7d..f146e6258 100644 --- a/frontend/src/ts/controllers/input-controller.ts +++ b/frontend/src/ts/controllers/input-controller.ts @@ -214,9 +214,6 @@ function handleSpace(): void { } Replay.addReplayEvent("submitErrorWord"); } - if (Config.tapeMode !== "off") { - TestUI.scrollTape(); - } let wordLength; if (Config.mode === "zen") { @@ -504,10 +501,6 @@ function handleChar(char: string, charIndex: number): void { TestInput.input.current = resultingWord; } - if (Config.tapeMode !== "off") { - TestUI.scrollTape(); - } - if (!thisCharCorrect && Config.difficulty == "master") { TestInput.input.pushHistory(); TestInput.corrected.pushHistory(); @@ -815,6 +808,9 @@ $(document).keydown(async (event) => { handleChar(char, TestInput.input.current.length); updateUI(); setWordsInput(" " + TestInput.input.current); + if (Config.tapeMode !== "off") { + TestUI.scrollTape(); + } } } }); @@ -891,6 +887,9 @@ $("#wordsInput").on("input", (event) => { setWordsInput(" " + TestInput.input.current); updateUI(); + if (Config.tapeMode !== "off") { + TestUI.scrollTape(); + } // force caret at end of input // doing it on next cycle because Chromium on Android won't let me edit