From 0d81cabb34b938e7c91f5de9d7c10187be0d3e2f Mon Sep 17 00:00:00 2001 From: Francisco Hodge Date: Thu, 11 Nov 2021 02:30:11 -0800 Subject: [PATCH] Fix layoutCandidates case insensitive selection per https://github.com/simple-keyboard/simple-keyboard-layouts/issues/1361 --- src/lib/components/Keyboard.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);