From 803a324d9c55bf1f02f7bf71cbe252db1822defc Mon Sep 17 00:00:00 2001 From: Francisco Hodge Date: Mon, 6 Mar 2023 10:39:31 -0500 Subject: [PATCH] Update input selection after button click. Per #1868 --- src/lib/components/Keyboard.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib/components/Keyboard.ts b/src/lib/components/Keyboard.ts index 9bfb4a40..9a364ed4 100644 --- a/src/lib/components/Keyboard.ts +++ b/src/lib/components/Keyboard.ts @@ -580,6 +580,10 @@ class SimpleKeyboard { */ if(this.caretPositionEnd && this.caretPosition !== this.caretPositionEnd){ this.setCaretPosition(this.caretPositionEnd, this.caretPositionEnd); + + if(this.activeInputElement){ + this.activeInputElement.setSelectionRange(this.caretPositionEnd, this.caretPositionEnd); + } if(this.options.debug){ console.log("Caret position aligned", this.caretPosition);