-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Description
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
No response
Description
When one has a textarea with the autoResize directive with e.g. 5 max rows and users enter more than 5 lines, the height of the textarea is limited correctly. But the cursor and the now written text is out of the viewport.
This problem occurs in Chrome. In Firefox the textarea scrolls to the cursor.

Reproduction
The problem doesn't occur inside StackBlitz, but in the official documentation.
StackBlitz link:
https://stackblitz.com/edit/cdktextareaautosize-problem
Angular Material Docs:
https://material.angular.dev/cdk/text-field/overview#automatically-resizing-a-lesstextareagreater
Steps to reproduce:
- Use Chrome
- Write more than 5 lines inside the textarea
Expected Behavior
The textarea should scroll to the cursor, if the cursor would be outside of the viewport otherwise.
Actual Behavior
The textarea does not scroll automatically in Chrome browsers.
Environment
- Angular: 19.2.4, 20.3.0
- CDK/Material: 19.2.4, 20.2.3
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): macOS