From 3b87f1df02da41518592c36215f1462e5ff9cf83 Mon Sep 17 00:00:00 2001 From: Francisco Hodge Date: Thu, 11 Nov 2021 01:33:27 -0800 Subject: [PATCH] Make layoutCandidates case insensitive per https://github.com/simple-keyboard/simple-keyboard-layouts/issues/1151 --- 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 c48058a0..3ac780b8 100644 --- a/src/lib/components/Keyboard.ts +++ b/src/lib/components/Keyboard.ts @@ -322,7 +322,7 @@ class SimpleKeyboard { (layoutCandidate: string) => { const inputSubstr = input.substring(0, this.getCaretPositionEnd() || 0) || input; - const regexp = new RegExp(`${layoutCandidate}$`, "g"); + const regexp = new RegExp(`${layoutCandidate}$`, "gi"); const matches = [...inputSubstr.matchAll(regexp)]; return !!matches.length; }