From 77feca2343603670192461e17b2b9c89fd4f34fb Mon Sep 17 00:00:00 2001 From: Francisco Hodge Date: Mon, 4 Jan 2021 03:23:40 -0500 Subject: [PATCH] Check for selectionStart before access. Fixes #855 --- src/lib/components/Keyboard.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/components/Keyboard.js b/src/lib/components/Keyboard.js index d7886443..b438aaa1 100644 --- a/src/lib/components/Keyboard.js +++ b/src/lib/components/Keyboard.js @@ -847,6 +847,8 @@ class SimpleKeyboard { if ( (targetTagName === "textarea" || targetTagName === "input") && + "selectionStart" in event.target && + "selectionEnd" in event.target && !instance.options.disableCaretPositioning ) { /**