Open
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
Calls to _measureScrollHeight, which trigger css layout, are not needed when there's nothing in the text field. In this case, simply set the height to 1 row (height of one line).
See internal CL 421826236 for more context.
Reproduction
Steps to reproduce:
- Bootstrap a textarea with cdkTextareaAutosize that has value of '' (empty)
Expected Behavior
_measureScrollHeight() called only when there's a non-empty value.
Actual Behavior
_measureScrollHeight() is called regardless of value.
Environment
- Angular: 13
- CDK/Material: 13
- Browser(s): All
- Operating System (e.g. Windows, macOS, Ubuntu): All