fixed backspace deleting 2 characgters when layout emulator was enabled. closes #1972

This commit is contained in:
Miodec 2021-10-09 13:03:26 +01:00
parent 94075b7083
commit a5b4b433cc

View file

@ -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);
}
});