Update input selection after button click. Per #1868

This commit is contained in:
Francisco Hodge 2023-03-06 10:39:31 -05:00
parent 2688075807
commit 803a324d9c

View File

@ -580,6 +580,10 @@ class SimpleKeyboard {
*/ */
if(this.caretPositionEnd && this.caretPosition !== this.caretPositionEnd){ if(this.caretPositionEnd && this.caretPosition !== this.caretPositionEnd){
this.setCaretPosition(this.caretPositionEnd, this.caretPositionEnd); this.setCaretPosition(this.caretPositionEnd, this.caretPositionEnd);
if(this.activeInputElement){
this.activeInputElement.setSelectionRange(this.caretPositionEnd, this.caretPositionEnd);
}
if(this.options.debug){ if(this.options.debug){
console.log("Caret position aligned", this.caretPosition); console.log("Caret position aligned", this.caretPosition);