Open BalogunofAfrica opened 6 months ago
I have similar issue but this time is when selection
is set. Only on Android, tested on v0.73.6, but it happens starting on v0.72.
<View>
<TextInput style={{backgroundColor: '#000', color: '#fff', paddingHorizontal: 20}} selection={{start: 0, end: 0}} multiline>
Text will disappear because it is in the children and "selection" is set
</TextInput>
</View>
https://github.com/facebook/react-native/assets/29953232/36cd1ddf-f23e-4509-899e-5fda8c5ec219
Same for me, but not only with focus based conditions
Description
Setting
color
instyle
prop for an uncontrolled input based on focus clears theTextInput
's value. example:isFocused
is set based ononBlur
andonFocus
.This same issue is not noticed for a controlled input. I have also linked a repro link with both cases side by side.
Affected platform:
Android
Steps to reproduce
npx react-native run-android
React Native Version
0.73.5
Affected Platforms
Runtime - Android
Output of
npx react-native info
Stacktrace or Logs
Reproducer
https://github.com/BalogunofAfrica/react-native-textinput-bug
Screenshots and Videos
https://github.com/facebook/react-native/assets/45393944/91a05b3e-06c1-4ca5-ac39-74d0da2522d7