Skip to content
Snippets Groups Projects
Commit 43ba6530 authored by jojohoch's avatar jojohoch
Browse files

Update TextAreaInput after each input when using the iqb keyboard

parent b5057cd7
No related branches found
No related tags found
No related merge requests found
......@@ -276,11 +276,14 @@ export abstract class TextInputGroupDirective extends ElementFormGroupDirective
return this.getInputElementValue().substring(endPosition);
}
setSelection(start: number, end: number, backSpaceAtFirstPosition?: boolean): void {
private setSelection(start: number, end: number, backSpaceAtFirstPosition?: boolean): void {
if (this.inputElement instanceof HTMLInputElement || this.inputElement instanceof HTMLTextAreaElement) {
this.inputElement.setSelectionRange(start, end);
} else if (!backSpaceAtFirstPosition) {
setTimeout(() => RangeSelectionService.setSelectionRange(this.inputElement, start, end));
setTimeout(() => {
RangeSelectionService.setSelectionRange(this.inputElement, start, end);
this.inputElement.dispatchEvent(new Event('input'));
});
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment