Skip to content
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

TextInput with multiline={true} render empty value #29569

Closed
eloisp opened this issue Aug 5, 2020 · 8 comments
Closed

TextInput with multiline={true} render empty value #29569

eloisp opened this issue Aug 5, 2020 · 8 comments
Labels
Component: TextInput Related to the TextInput component. Impact: Regression Describes a behavior that used to work on a prior release, but stopped working recently. Resolution: PR Submitted A pull request with a fix has been provided. Stale There has been a lack of activity on this issue and it may be closed soon.

Comments

@eloisp
Copy link

eloisp commented Aug 5, 2020

Description

Hi,
I found a bug with TextInput when multiline={true} and when we change the value (in a certain situation, after a render but not the first.)
Bug on iOS (did not test on android).

React Native version:

System:
OS: macOS 10.15.6
CPU: (4) x64 Intel(R) Core(TM) i7-4558U CPU @ 2.80GHz
Memory: 28.43 MB / 8.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.16.1 - /usr/local/bin/node
Yarn: 1.22.4 - /usr/local/bin/yarn
npm: 6.13.4 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.9.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 13.6, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
Android SDK:
API Levels: 24, 25, 26, 27, 28, 29
Build Tools: 25.0.2, 26.0.0, 26.0.1, 28.0.3, 29.0.2, 29.0.3
Android NDK: Not Found
IDEs:
Android Studio: 3.6 AI-192.7142.36.36.6392135
Xcode: 11.6/11E708 - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_121 - /usr/bin/javac
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: 16.13.1 => 16.13.1
react-native: 0.63.2 => 0.63.2
npmGlobalPackages:
react-native: Not Found

Steps To Reproduce

To reproduce the bug, I made a repo :
https://github.com/eloisp/react-native-textinput-multiline-bug/
If you change multiline to false, the bug disapear.

  1. You can click on every button, it's ok.
  2. Click on the first button (with //is multiline)
  3. Change the content
  4. Click on the other blue button, all TextInput are now empty (but the good data is passed to the props value, and the user state is ok.).

Expected Results

All TextInput have the correct value inside.

Snack, code example, screenshot, or link to a repository:

https://github.com/eloisp/react-native-textinput-multiline-bug/
https://github.com/eloisp/react-native-textinput-multiline-bug/blob/master/App.js

@react-native-bot react-native-bot added the Component: TextInput Related to the TextInput component. label Aug 5, 2020
@chrisglein
Copy link

I created a Snack to help test this repro: https://snack.expo.io/@chrisglein/repro29569
Tried on iOS and Android. I'm not seeing the behavior (assuming I'm getting your repro correct). However I think Snack might not be on 0.63 yet, as it lags behind a little bit. Can you confirm if you're seeing what you expect in the Snack or not?

@eloisp
Copy link
Author

eloisp commented Aug 5, 2020

I have already tested on snack, there is no bug on it. Only on the xcode simulator and on my device (iphone XR).

@github-actions github-actions bot added Needs: Attention Issues where the author has responded to feedback. and removed Needs: Author Feedback labels Aug 5, 2020
@eloisp
Copy link
Author

eloisp commented Aug 5, 2020

Here a record screen : https://www.youtube.com/watch?v=wgwwb4ljTEw

@eloisp
Copy link
Author

eloisp commented Aug 5, 2020

I just tried on react-native 0.62.2. No problem, it works well.
So this issue is only on 0.63.X

@chrisglein chrisglein added Impact: Regression Describes a behavior that used to work on a prior release, but stopped working recently. Needs: Issue Manager Attention and removed Needs: Attention Issues where the author has responded to feedback. labels Aug 5, 2020
@hank121314
Copy link
Contributor

May I pick up this issue?
I think I have found the problem.

@eloisp
Copy link
Author

eloisp commented Aug 7, 2020

I just tested your PR @hank121314
It works ! Nice work.

Thank You !

@github-actions
Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Jun 19, 2023
@github-actions
Copy link

This issue was closed because it has been stalled for 7 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: TextInput Related to the TextInput component. Impact: Regression Describes a behavior that used to work on a prior release, but stopped working recently. Resolution: PR Submitted A pull request with a fix has been provided. Stale There has been a lack of activity on this issue and it may be closed soon.
Projects
None yet
4 participants