This commit is contained in:
Francisco Hodge 2021-11-11 02:30:11 -08:00
parent 00fbc6c105
commit 0d81cabb34

View File

@ -368,7 +368,7 @@ class SimpleKeyboard {
currentInput.substring(0, initialCaretPosition || 0) || currentInput.substring(0, initialCaretPosition || 0) ||
currentInput; currentInput;
const regexp = new RegExp(`${candidateKey}$`, "g"); const regexp = new RegExp(`${candidateKey}$`, "gi");
const newInputSubstr = inputSubstr.replace(regexp, selectedCandidate); const newInputSubstr = inputSubstr.replace(regexp, selectedCandidate);
const newInput = currentInput.replace(inputSubstr, newInputSubstr); const newInput = currentInput.replace(inputSubstr, newInputSubstr);