bug(cdkTextareaAutosize): Autosize does not properly compute line heights when min-height or height is set via css
- Vorherrschende Sprache
- TypeScript
- Sterne
- 25k
- Forks
- 6.8k
- Ø Merge
- 1 T. 8 Std.
- Gemergte PRs (30 T.)
- 91
Beschreibung
### 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 `height` or `min-height` is set on a `textarea`, cdkTextareaAutosize does not properly calculate the line height.
I have a pull request ready to fix this issue, and will submit it shortly.
### Reproduction
StackBlitz link: https://stackblitz.com/edit/components-issue-mopjkj?file=src%2Fapp%2Fexample-component.css
### Expected Behavior
`height` and `min-height` should not affect the line height used to calculate the height based on min rows.
### Actual Behavior
`height` and `min-height` do affect the line height.
### Environment
- Angular: 16.2
- CDK/Material: 16.2
- Browser(s): Chrome (current)
Beitragsleitfaden
Rechercherichtung
Beginne mit der Implementierung von cdkTextareaAutosize und reproduziere das Verhalten anhand des verknüpften StackBlitz-Beispiels, insbesondere anhand von src/app/example-component.css. Überprüfe, wie sich CSS height und min-height auf die berechnete Zeilenhöhe auswirken, und bestätige anschließend, dass die min-row-Größenbestimmung diese Werte nicht mehr verwendet.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- angular, typescript
- Bereich
- frontend
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 25/100