Skip to content

bug(cdkTextareaAutosize): Screen scrolls when deleting a character in a text area without cdkAutosizeMaxRows #18862

@timruhle

Description

@timruhle

Reproduction

https://stackblitz.com/edit/angular-fpxqpq?file=src%2Fapp%2Ftext-field-autosize-textarea-example.html

Steps to reproduce:

  1. Copy the Lorem ipsum text into the text area
  2. Scroll up a bit
  3. Delete a character from the middle of the textarea
  4. The screen will have scrolled

reproduction

Expected Behavior

What behavior were you expecting to see?
The screen to not scroll

Actual Behavior

What behavior did you actually see?
Users are getting disorientated when the screen scrolls and their text moves, so the screen should not scroll

Environment

  • Angular: v9.0.7
  • CDK/Material: v9.1.3
  • Browser(s): Chrome 80
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows 10

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: cdk/text-field

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions