Skip to content

bug(CdkTextareaAutosize): Textarea does not scroll to active line #30841

@benthieu

Description

@benthieu

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

19.2.0

Description

With the new version of the cdk the textarea does no longer scroll to the active line, when cdkAutosizeMaxRows is set.

Reproduction

StackBlitz link:
Steps to reproduce:

  1. Create more than 5 new lines in textarea
  2. Textarea does not scroll down to the active line

Expected Behavior

The textarea should show the current line

Actual Behavior

https://stackblitz.com/edit/ozyjlswf?file=src%2Fexample%2Ftext-field-autosize-textarea-example.ts

Environment

  • Angular: 19.2.0
  • CDK/Material: 19.2.8
  • Browser(s): Chrome
  • Operating System (e.g. Windows, macOS, Ubuntu): macOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageThis issue needs to be triaged by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions