Programmatically focusing a TextInput with textAlign: 'center' that already has text starts the cursor off in the middle of the text #26994
Labels
Bug
Component: TextInput
Related to the TextInput component.
Stale
There has been a lack of activity on this issue and it may be closed soon.
If a
<TextInput style={{ textAlign: 'center' }}/>`` element has text in it, and it is focused using
inputRef.focus()``` the cursor starts off in the middle of the text.The work around for #24519, is to focus TextInput for people using TalkBack on Android by manually focusing the control. Having the cursor start off in the middle of the text is a poor experience.
React Native version:
RN .59
Steps To Reproduce
See reproduction at https://snack.expo.io/r1eyi31cS which when ran on device shows that the bug happens in an number of ways.
Describe what you expected to happen:
Text editing cursor starts off at the end of the text being edited
Snack, code example, screenshot, or link to a repository: https://snack.expo.io/r1eyi31cS
The text was updated successfully, but these errors were encountered: