diff --git a/projects/player/src/app/directives/text-input-group.directive.ts b/projects/player/src/app/directives/text-input-group.directive.ts index 0bb8ec0d8422e485a3ef8d7552f85b7c337e86bd..8d498d01c91b03e570c6b1ce3a3c375262c7f677 100644 --- a/projects/player/src/app/directives/text-input-group.directive.ts +++ b/projects/player/src/app/directives/text-input-group.directive.ts @@ -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')); + }); } }