From 3391cf87babf0c8cb35d22dde095abf0fa6ae524 Mon Sep 17 00:00:00 2001 From: Francisco Hodge Date: Sun, 15 Jan 2023 16:40:32 -0500 Subject: [PATCH] Ignore selectionchange on Firefox. Fixes #1839 --- src/lib/components/Keyboard.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lib/components/Keyboard.ts b/src/lib/components/Keyboard.ts index 95109174..1bf7dece 100644 --- a/src/lib/components/Keyboard.ts +++ b/src/lib/components/Keyboard.ts @@ -1153,6 +1153,13 @@ class SimpleKeyboard { */ /* istanbul ignore next */ handleSelectionChange(event: KeyboardHandlerEvent): void { + /** + * Firefox is not reporting the correct caret position through this event + * https://github.com/hodgef/simple-keyboard/issues/1839 + */ + if(navigator.userAgent.includes('Firefox')){ + return; + } this.caretEventHandler(event); }