-
-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiline TextInput Auto-growing and Scrolling Behavior Issues with KeyboardAwareScrollView #794
Comments
@NyoriK do you test new architecture or old? |
@kirillzyusko Yes. app.json:
|
@NyoriK would you mind to try this PR? And let me know if it fixes the problem for you? In general it works, but the main downside is that it doesn't work on Android - I opened a PR in react-native. Let's see if it gets accepted/merged 👀 |
@kirillzyusko I've tested the PR, and can confirm it works as intended on iOS. The behavior is now much closer to native ScrollView. There's still some minor jumpiness when typing at the end of the TextInput, but this appears to be the same as with native ScrollView and is expected due to the combination of TextInput's internal scroll and asynchronous height adjustments (as discussed in #708). Looking forward to the Android fix once the React Native PR is merged. Thanks for working on this! |
@kirillzyusko Just tested again on Android and can confirm - the fix doesn't work on Android. When typing reaches the keyboard area, the KeyboardAwareScrollView doesn't scroll up, and the content being typed goes underneath the keyboard. Will await the Android fix once the React Native PR is merged. |
Yeah, an intermediate solution can be combining "additional view" approach on Android and using But it looks like PR has been merged in upstream, so maybe in RN 0.79 we'll get this prop available on Android 🙈 |
Overview
I've identified several inconsistencies in the TextInput component's auto-growing behavior when used with KeyboardAwareScrollView, affecting both iOS and Android platforms. These issues vary depending on prop configurations and component wrapping.
Detailed Findings
Base Case (No value/onChangeText props)
kas-without-props.mp4
With value and onChangeText props
Noticeable "jumpy" behavior when:
kas-with-props.mp4
TextInput Wrapped in View
kas-with-views.mp4
Comparison with React Native's ScrollView
Native ScrollView demonstrates superior behavior:
rns-without-props-and-views.mp4
Code Examples
I've included three implementation scenarios to demonstrate these issues and one with react native ScrollView:
Devices tested:
Android:
iOS:
Development Environment:
Environment:
The text was updated successfully, but these errors were encountered: