mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-28 00:35:25 +08:00
fixed incorrect index in some specific cases
fixed accuracy calculation when swipe typing could be part of #3690
This commit is contained in:
parent
8bea978fd5
commit
1e4f1c66f0
1 changed files with 6 additions and 1 deletions
|
@ -1063,9 +1063,14 @@ $("#wordsInput").on("input", (event) => {
|
|||
diffStart++;
|
||||
}
|
||||
|
||||
let iOffset = 0;
|
||||
if (/.+ .+/.test(inputValue)) {
|
||||
iOffset = inputValue.indexOf(" ") + 1;
|
||||
console.log("iOffset", iOffset);
|
||||
}
|
||||
for (let i = diffStart; i < inputValue.length; i++) {
|
||||
// passing realInput to allow for correct Korean character compilation
|
||||
handleChar(inputValue[i], i, realInputValue);
|
||||
handleChar(inputValue[i], i - iOffset, realInputValue);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue