updated when scolltape is called

This commit is contained in:
Miodec 2022-04-27 20:36:40 +02:00
parent fe0e8c0cd4
commit a3500adb97

View file

@ -214,6 +214,9 @@ function handleSpace(): void {
}
Replay.addReplayEvent("submitErrorWord");
}
if (Config.tapeMode !== "off") {
TestUI.scrollTape();
}
let wordLength;
if (Config.mode === "zen") {
@ -501,6 +504,10 @@ 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();
@ -808,9 +815,6 @@ $(document).keydown(async (event) => {
handleChar(char, TestInput.input.current.length);
updateUI();
setWordsInput(" " + TestInput.input.current);
if (Config.tapeMode !== "off") {
TestUI.scrollTape();
}
}
}
});
@ -887,9 +891,6 @@ $("#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