-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[Fabric] ScrollView + autogrowing TextInput + Reanimated prevents TextInput autogrow #5567
Labels
Platform: Android
This issue is specific to Android
Platform: iOS
This issue is specific to iOS
Repro provided
A reproduction with a snippet of code, snack or repo is provided
Reproducible 🎉
Comments
github-actions
bot
added
Platform: Android
This issue is specific to Android
Platform: iOS
This issue is specific to iOS
Repro provided
A reproduction with a snippet of code, snack or repo is provided
labels
Jan 9, 2024
@tomekzaw I've tracked this error down and it looks that I've found its origin:
Indeed if you remove code below this comment then you can use multiline text input as expected.
|
1 task
kirillzyusko
added a commit
to kirillzyusko/react-native-keyboard-controller
that referenced
this issue
Jan 12, 2024
## 📜 Description Removed view wrapper. Attached that view as last child + kept padding for this view. ## 💡 Motivation and Context The approach with additional view was added in #257 I don't remember exact reason, but for me it seems like it was added, because TExtInputs were not able to grow. However such approach is causing additional issues: - breaks styling in some cases - stickyHeaderIndices={[0]} produces a crash (because RN will try to attach `Animated`-based style to REA view) So in this PR I'm removing this view wrapper and apply additional padding in mostly the same way as it was before #257 (additional child-view in the end of ScrollView, but instead of `height` I'm animating `paddingBottom`). I've tested and it still works (i. e. inputs are growing). E2E tests also passing (so there seems to be 1px difference, which can be neglected, but i had to update assets to assure E2E tests consistency). > [!IMPORTANT] > This fix will introduce software-mansion/react-native-reanimated#5567. I've added that issue as "known issue" in docs page. I think it's better to have properly working paper architecture and Fabric can be fixed later (because it's still in early adoption and is not widely used). Closes #325 ## 📢 Changelog <!-- High level overview of important changes --> <!-- For example: fixed status bar manipulation; added new types declarations; --> <!-- If your changes don't affect one of platform/language below - then remove this platform/language --> ### E2E - added `detox-clean` command (useful when you updated XCode version and haven't run detox tests yet) ### JS - removed wrapper and moved view as last child ## 🤔 How Has This Been Tested? Tested on: - e2e (Android, iOS - paper) - Pixel 7 Pro (Android 14, paper) ## 📸 Screenshots (if appropriate): There is no visual difference 🙂 ## 📝 Checklist - [x] CI successfully passed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Platform: Android
This issue is specific to Android
Platform: iOS
This issue is specific to iOS
Repro provided
A reproduction with a snippet of code, snack or repo is provided
Reproducible 🎉
Description
A combination of
ScrollView
+ autogrowingTextInput
and reanimated prevents TextInput from a grow.Important
I provided a snack link, but it's not reproducible in snack, because I guess it's running old arch. The issue is reproducible in new arch only - I guess you can paste a code into your FabricExample app. But if it's not reproducible on your end - let me know and i'll prepare a repo.
Steps to reproduce
Actual result:
TextInput
is not growingtelegram-cloud-document-2-5253502600879293000.mp4
Expected result:
TextInput
growsautogrow-expected.mp4
Snack or a link to a repository
https://snack.expo.dev/@kirylziusko/rea-textinput-autogrow-issue
Reanimated version
3.6.1
React Native version
0.72.4
Platforms
Android, iOS
JavaScript runtime
Hermes
Workflow
React Native
Architecture
Fabric (New Architecture)
Build type
Debug app & dev bundle
Device
Real device, simulator
Device model
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: