mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-10-20 04:26:28 +08:00
fixed anti word jump code not allowing input after restarting
This commit is contained in:
parent
f7c435056f
commit
bc94a6474b
1 changed files with 5 additions and 1 deletions
|
@ -4658,6 +4658,10 @@ $(document).keydown(function (event) {
|
|||
}
|
||||
}
|
||||
|
||||
if (currentInput.length === 1 && currentWordIndex === 0) {
|
||||
activeWordTop = document.querySelector("#words .active").offsetTop;
|
||||
}
|
||||
|
||||
if (currentInput.length < wordsList[currentWordIndex].length + 20)
|
||||
currentInput += event["key"];
|
||||
setFocus(true);
|
||||
|
@ -4675,7 +4679,7 @@ $(document).keydown(function (event) {
|
|||
activeWordJumped = false;
|
||||
}
|
||||
|
||||
if (activeWordJumped) {
|
||||
if (activeWordJumped && currentInput.length > 1) {
|
||||
currentInput = currentInput.slice(0, -1);
|
||||
compareInput(!config.blindMode);
|
||||
activeWordJumped = false;
|
||||
|
|
Loading…
Add table
Reference in a new issue