fixed a bug where single character words in nospcae funbox would cause backspace to trigger twice

This commit is contained in:
Miodec 2022-09-29 18:44:58 +02:00
parent aba32bd11d
commit ebf3c73709

View file

@ -123,6 +123,7 @@ function backspaceToPrevious(): void {
TestInput.corrected.popHistory();
if (Config.funbox === "nospace" || Config.funbox === "arrows") {
TestInput.input.current = TestInput.input.current.slice(0, -1);
setWordsInput(" " + TestInput.input.current + " ");
}
TestWords.words.decreaseCurrentIndex();
TestUI.setCurrentWordElementIndex(TestUI.currentWordElementIndex - 1);