angular / angular/components

bug(cdkTextareaAutosize): Autosize does not properly compute line heights when min-height or height is set via css

オープン
#28,101 コメント 1 件 リアクション 2 件 担当者 0 名 GitHub で見る
area: cdk/text-field P3
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
91

説明

### 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)

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

cdkTextareaAutosize の実装から始め、リンクされている StackBlitz の例を使って動作を再現します。特に、その src/app/example-component.css を確認してください。CSS height と min-height が計算された行の高さにどのように影響するかを検証し、その後、min-row のサイズ設定でこれらの値が使用されなくなったことを確認してください。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, typescript
領域
frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。