bug(CdkTextareaAutosize): Textarea does not scroll to active line
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
### Is this a regression?
- [x] Yes, this behavior used to work in the previous version
### The previous version in which this bug was not present was
18
### Description
Hello,
Is there currently a solution or planned fix for this issue?
As described in [issue 30841](https://github.com/angular/components/issues/30841)
, when using the textarea with cdkTextareaAutosize, the component does not automatically scroll to keep the cursor in view once the content exceeds the maxRows. This makes the textarea very difficult to use.
The problem occurs on Google Chrome (but not in Firefox).
It appeared starting from Angular Material v19.
In v18, the behavior was correct: https://v18.material.angular.dev/cdk/text-field/overview
From v19 up to the current version, the bug is reproducible in Chrome: https://material.angular.dev/cdk/text-field/overview
Thank you for your help and clarification.
### Reproduction
StackBlitz link: https://stackblitz.com/edit/ozyjlswf?file=src%2Fexample%2Ftext-field-autosize-textarea-example.html
Steps to reproduce:
Using google Chrome:
1. start typing in the textarea (add lines pressing enter)
2. when more that 5 lines are added, cursor deapear and we are typing in the hidden part of the textarea (we don't see what we are typing anymore)
Do the same on Firefox:
- the textarea scrolls automatically to active line
### Expected Behavior
The textarea does not scroll automatically to the active line on google chrome
### Actual Behavior
The textarea should scroll automatically to the active line on all nagigators
### Environment
- Angular: 20
- CDK/Material: 20
- Browser(s): Google Chrome
- Operating System: Windows, macOS, Ubuntu
コントリビューションガイド
調査の方向性
Chrome でリンクされた StackBlitz の例を使って問題を再現し、その後 Firefox および Angular Material v18 と v20 の例と動作を比較します。textarea に 5 行を超えて入力し、入力中もカーソルが表示されたままであることを確認します。Chrome が Firefox と同様にアクティブな行までスクロールすれば、修正は完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100