diff --git a/src/lib/components/Keyboard.ts b/src/lib/components/Keyboard.ts index 3ac780b8..94442ca0 100644 --- a/src/lib/components/Keyboard.ts +++ b/src/lib/components/Keyboard.ts @@ -368,7 +368,7 @@ class SimpleKeyboard { currentInput.substring(0, initialCaretPosition || 0) || currentInput; - const regexp = new RegExp(`${candidateKey}$`, "g"); + const regexp = new RegExp(`${candidateKey}$`, "gi"); const newInputSubstr = inputSubstr.replace(regexp, selectedCandidate); const newInput = currentInput.replace(inputSubstr, newInputSubstr);