[iOS] The scroll position of the multiline TextInput affects the ScrollView auto-scroll when the keyboard opens/closes
オープン
まだ誰も着手していません。
API: Keyboard
Component: ScrollView
Component: TextInput
Issue: Author Provided Repro
- 主要言語
- C++
- スター
- 127k
- フォーク
- 25.3k
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 4
説明
Description
On iOS, when using a ScrollView with automaticallyAdjustKeyboardInsets and a multiline TextInput, the scroll position of the TextInput affects how the ScrollView auto-scrolls when the keyboard opens or closes.
Steps to reproduce
<ScrollView automaticallyAdjustKeyboardInsets>
// Any content above the TextInput to position it at the bottom of the screen
<TextInput multiline style={{ height: 100 }} /> // multiline TextInput with fixed height and many lines of text (let say 20)
// More content to allow the ScrollView to scroll if needed
</ScrollView>
- ScrollView with automaticallyAdjustKeyboardInsets
- Content above the TextInput to fill the screen
- Multiline TextInput with fixed height and many lines of text
- Content below the TextInput to allow the ScrollView to scroll if needed
- Focus on the input and scroll it to the end
- Scroll the ScrollView to align the TextInput at the bottom of the screen
- Focus on the last line in the TextInput
- The keyboard slides up, and the ScrollView scrolls too much
- With the keyboard open, scroll the ScrollView to align the TextInput at the bottom of the screen (above the keyboard)
- Close the keyboard
- The ScrollView scrolls up
React Native Version
0.79.5
Affected Platforms
Runtime - iOS
Output of npx @react-native-community/cli info
This is not relevant
Stacktrace or Logs
This is not relevant
MANDATORY Reproducer
Screenshots and Videos
https://github.com/user-attachments/assets/1566ea6e-e936-4670-a18a-80090857f58c
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
必須の iOS Snack reproducer から始め、キーボードを開閉する際の ScrollView と multiline TextInput の動作を比較します。automaticallyAdjustKeyboardInsets の処理を追跡し、その後、キーボードを開いたときに ScrollView が過剰にスクロールせず、閉じたときに上方向へ移動しないことを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- ios, react-native
- 領域
- mobile
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100