mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-05 05:17:51 +08:00
Always reset #wordsInput with layout emulator (#1960)
This commit is contained in:
parent
6d9b28c1ca
commit
57f6eec430
1 changed files with 4 additions and 3 deletions
|
@ -399,7 +399,6 @@ function handleChar(char, charIndex) {
|
|||
|
||||
if (!thisCharCorrect && Misc.trailingComposeChars.test(resultingWord)) {
|
||||
TestLogic.input.current = resultingWord;
|
||||
setWordsInput(" " + TestLogic.input.current);
|
||||
TestUI.updateWordElement();
|
||||
Caret.updatePosition();
|
||||
return;
|
||||
|
@ -472,7 +471,6 @@ function handleChar(char, charIndex) {
|
|||
charIndex < TestLogic.words.getCurrent().length + 20)
|
||||
) {
|
||||
TestLogic.input.current = resultingWord;
|
||||
setWordsInput(" " + TestLogic.input.current);
|
||||
}
|
||||
|
||||
if (!thisCharCorrect && Config.difficulty == "master") {
|
||||
|
@ -545,7 +543,6 @@ function handleChar(char, charIndex) {
|
|||
Caret.updatePosition();
|
||||
}
|
||||
|
||||
setWordsInput(" " + TestLogic.input.current);
|
||||
}
|
||||
|
||||
function handleTab(event) {
|
||||
|
@ -608,6 +605,7 @@ function handleTab(event) {
|
|||
} else {
|
||||
event.preventDefault();
|
||||
handleChar("\t", TestLogic.input.current.length);
|
||||
setWordsInput(" " + TestLogic.input.current);
|
||||
}
|
||||
} else if (!TestUI.resultVisible) {
|
||||
if (
|
||||
|
@ -620,6 +618,7 @@ function handleTab(event) {
|
|||
} else {
|
||||
event.preventDefault();
|
||||
handleChar("\t", TestLogic.input.current.length);
|
||||
setWordsInput(" " + TestLogic.input.current);
|
||||
}
|
||||
}
|
||||
} else if (Config.quickTab) {
|
||||
|
@ -708,6 +707,7 @@ $(document).keydown((event) => {
|
|||
TestLogic.finish();
|
||||
} else {
|
||||
handleChar("\n", TestLogic.input.current.length);
|
||||
setWordsInput(" " + TestLogic.input.current);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -735,6 +735,7 @@ $(document).keydown((event) => {
|
|||
handleChar(char, TestLogic.input.current.length);
|
||||
updateUI();
|
||||
}
|
||||
setWordsInput(" " + TestLogic.input.current);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue