mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-03-04 18:53:26 +08:00
fix: ctrl+backspace replay bug (ashinberish)
This commit is contained in:
parent
2ff0c60072
commit
5ff0c3fdec
1 changed files with 6 additions and 1 deletions
|
@ -1332,7 +1332,12 @@ $("#wordsInput").on("input", (event) => {
|
|||
TestUI.updateWordElement();
|
||||
void Caret.updatePosition();
|
||||
if (!CompositionState.getComposing()) {
|
||||
Replay.addReplayEvent("setLetterIndex", currTestInput.length - 1);
|
||||
const keyStroke = event?.originalEvent as InputEvent;
|
||||
if (keyStroke.inputType === "deleteWordBackward") {
|
||||
Replay.addReplayEvent("setLetterIndex", 0); // Letter index will be 0 on CTRL + Backspace Event
|
||||
} else {
|
||||
Replay.addReplayEvent("setLetterIndex", currTestInput.length - 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (inputValue !== currTestInput) {
|
||||
|
|
Loading…
Reference in a new issue