-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Open
Labels
GThis is is related to a Google internal issueThis is is related to a Google internal issueP3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: cdk/text-field
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
Metadata
Metadata
Assignees
Labels
GThis is is related to a Google internal issueThis is is related to a Google internal issueP3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentAn issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: cdk/text-field