TextInput-property selectTextOnFocus wrong behavior while input Text #47696
Labels
Component: TextInput
Related to the TextInput component.
Needs: Author Feedback
Needs: Repro
This issue could be improved with a clear list of steps to reproduce the issue.
Newer Patch Available
Description
Let's assume that we have a TextInput field with a width of 50px and the attribute 'selectTextOnFocus=false'. The character 'W', for example, fits into this field 5x. If you enter another 'W', then the 1st 'W' disappears behind the left edge of the TextInput field - so far so good.
If you do the same with 'selectTextOnFocus=true', the entire content of the TextInput is selected when the 6th 'W' is entered. If you now type in another character, the selection is deleted and replaced by the current character - this is wrong and certainly not what you want.
Steps to reproduce
React Native Version
0.76.x
Affected Platforms
Runtime - Android
Output of
npx react-native info
Stacktrace or Logs
Reproducer
NOT REPRODUCEABLE IN SNACK !!!!!!!!!!!!
https://snack.expo.dev/Q5Ik92dmP6Leh1YAPyWBB
Screenshots and Videos
file.mp4
Snack:
https://snack.expo.dev/Q5Ik92dmP6Leh1YAPyWBB
The text was updated successfully, but these errors were encountered: