Skip to content

bug(cdkTextareaAutosize): cdkTextareaAutosize does not resize when the placeholder or label is long #22042

Closed

Description

Reproduction

https://stackblitz.com/edit/angular-2ebx1r?file=src/app/./text-field-autosize-textarea-example.html

Expected Behavior

What behavior were you expecting to see?

When a textarea has a long placeholder or label and the textarea using cdkTextareaAutosize, the text area should be auto-sized to support the length of the placeholder

Actual Behavior

What behavior did you actually see?

The text area does not auto-size to the placeholder or label used, and instead stays at the min number of rows and shows an internal (scrollbar?) the scroll through the placeholder

Environment

  • Angular: latest
  • CDK/Material: latest
  • Browser(s): all
  • Operating System (e.g. Windows, macOS, Ubuntu): all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    GThis is is related to a Google internal issueP2The issue is important to a large percentage of users, with a workaroundarea: cdk/text-fieldfeatureThis issue represents a new feature or feature request rather than a bug or bug fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions