0

When I update the text area, the cursor is moving to the end of the string. How can I keep cursor at the updated position?

<textarea
        matInput
        [(ngModel)]="gtString"
        (ngModelChange)="updateWarningMessage()"
        cdkTextareaAutosize
        #autosize="cdkTextareaAutosize"
        cdkAutosizeMinRows="1"
        cdkAutosizeMaxRows="7"
        (input)="onChangeArray()"
></textarea>

For example, when I delete middle of the string, cursor is moving to the end of the string but I want to keep cursor in the deleted position. What do you suggest for solution? Thanks.

Jessica K
  • 1
  • 1

0 Answers0