mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2024-09-23 00:37:29 +08:00
fixed backspace deleting 2 characgters when layout emulator was enabled. closes #1972
This commit is contained in:
parent
94075b7083
commit
a5b4b433cc
|
@ -32,6 +32,7 @@ function setWordsInput(value) {
|
|||
// Only change #wordsInput if it's not already the wanted value
|
||||
// Avoids Safari triggering unneeded events, causing issues with
|
||||
// dead keys.
|
||||
console.log("settings words input to " + value);
|
||||
if (value !== $("#wordsInput").val()) {
|
||||
$("#wordsInput").val(value);
|
||||
}
|
||||
|
@ -739,8 +740,8 @@ $(document).keydown((event) => {
|
|||
event.preventDefault();
|
||||
handleChar(char, TestLogic.input.current.length);
|
||||
updateUI();
|
||||
setWordsInput(" " + TestLogic.input.current);
|
||||
}
|
||||
setWordsInput(" " + TestLogic.input.current);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue