Open
Description
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