Android: Controlled TextInput Issue
See original GitHub issueDescription
On some Android’s, the controlled TextInput is not being controlled correctly, Tested on Samsung Galaxy S7( SM-G935F )
it seems to work on Numbers, Emoji, special chars … but only Characters [a-z], [A-Z] are affected, it resets every 4 characters press
exactly same as
Tested on iPhone 12, 11 ( working as expected )
Version
0.64.3
Output of react-native info
System: OS: Windows 10 10.0.19043 CPU: (12) x64 Intel® Core™ i7-10850H CPU @ 2.70GHz Memory: 14.74 GB / 31.61 GB Binaries: Node: 16.6.1 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.17 - ~\AppData\Roaming\npm\yarn.CMD npm: 7.20.3 - C:\Program Files\nodejs\npm.CMD Watchman: Not Found SDKs: Android SDK: Not Found Windows SDK: Not Found IDEs: Android Studio: Not Found Visual Studio: Not Found Languages: Java: 16.0.2 - /c/Program Files/Common Files/Oracle/Java/javapath/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.1 => 17.0.1 react-native: 0.64.3 => 0.64.3 react-native-windows: Not Found npmGlobalPackages: react-native: Not Found
Steps to reproduce
- make new RN or Expo project
- put controlled Text input ( with state )
- open app in Samsung Galaxy S7( SM-G935F )
- start typing
Snack, code example, screenshot, or link to a repository
No response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:5 (2 by maintainers)
Top GitHub Comments
@cortinico I vote for “no close please”, because OP set TextInput in uncontrolled mode by using defaultValue instead of value. So defaultValue is only workaround, not resolution for this issue. I can say that this issue was always here: lost of syncronization between native and JS state of input. To trigger issue before 0.62 we need to have heavy
onChangeText
callback, but since 0.62 (when TextInput war rewritten to Hooks & view commands replacessetNativeProps
) issue araises even with tiny user code.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.