bug(cdkTextareaAutosize): Textarea padding breaks auto-height work
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
### Description
It is not possible to set vertical padding for Textarea
- it doesn't count
- as you enter text, the height of the field increases without adding a newline
### Reproduction
Steps to reproduce:
1. Use
```
cdkTextareaAutosize
cdkAutosizeMinRows="1"
cdkAutosizeMaxRows="10"
```
3. Add padding to style ".textarea {padding: 10px;}"
### Expected Behavior
- added padding
- the height only changes when the text is increased by one line
### Actual Behavior
- field height increases for each letter
- vertical padding is not taken into account
stackblitz - [https://stackblitz.com/edit/angular-zqu9zw](https://stackblitz.com/edit/angular-zqu9zw?file=src%2Fmain-component.html)
### Environment
- Angular: 15.2.8
- CDK/Material: 15.2.8
- Browser(s): Chrome Version 112.0.5615.138
- Operating System (e.g. Windows, macOS, Ubuntu): Windows 10
コントリビューションガイド
調査の方向性
リンク先の StackBlitz にある cdkTextareaAutosize の再現から始め、指定された padding と行の設定に対する動作を比較します。垂直方向の padding が計算された高さに含まれ、テキストが行を追加した場合にのみ textarea が拡張されれば、作業は完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 50/100