mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-29 10:17:30 +08:00
fix(typing test): line jumping too late
This commit is contained in:
parent
44ecb3671e
commit
04a64c6662
1 changed files with 23 additions and 23 deletions
|
|
@ -309,6 +309,29 @@ async function handleSpace(): Promise<void> {
|
|||
|
||||
TestInput.corrected.pushHistory();
|
||||
|
||||
if (Config.keymapMode === "react") {
|
||||
void KeymapEvent.flash(" ", true);
|
||||
}
|
||||
if (
|
||||
Config.mode === "words" ||
|
||||
Config.mode === "custom" ||
|
||||
Config.mode === "quote" ||
|
||||
Config.mode === "zen"
|
||||
) {
|
||||
TimerProgress.update();
|
||||
}
|
||||
if (
|
||||
Config.mode === "time" ||
|
||||
Config.mode === "words" ||
|
||||
Config.mode === "custom" ||
|
||||
Config.mode === "quote"
|
||||
) {
|
||||
await TestLogic.addWord();
|
||||
}
|
||||
TestUI.setCurrentWordElementIndex(TestUI.currentWordElementIndex + 1);
|
||||
TestUI.updateActiveElement();
|
||||
void Caret.updatePosition();
|
||||
|
||||
if (
|
||||
!Config.showAllLines ||
|
||||
Config.mode === "time" ||
|
||||
|
|
@ -345,29 +368,6 @@ async function handleSpace(): Promise<void> {
|
|||
// //send a tab event using jquery
|
||||
// $("#wordsInput").trigger($.Event("keydown", { key: "Tab", code: "Tab" }));
|
||||
// }
|
||||
|
||||
if (Config.keymapMode === "react") {
|
||||
void KeymapEvent.flash(" ", true);
|
||||
}
|
||||
if (
|
||||
Config.mode === "words" ||
|
||||
Config.mode === "custom" ||
|
||||
Config.mode === "quote" ||
|
||||
Config.mode === "zen"
|
||||
) {
|
||||
TimerProgress.update();
|
||||
}
|
||||
if (
|
||||
Config.mode === "time" ||
|
||||
Config.mode === "words" ||
|
||||
Config.mode === "custom" ||
|
||||
Config.mode === "quote"
|
||||
) {
|
||||
await TestLogic.addWord();
|
||||
}
|
||||
TestUI.setCurrentWordElementIndex(TestUI.currentWordElementIndex + 1);
|
||||
TestUI.updateActiveElement();
|
||||
void Caret.updatePosition();
|
||||
}
|
||||
|
||||
function isCharCorrect(char: string, charIndex: number): boolean {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue