-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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 behavior on programmatic value change differs between iOS/Android #18578
Comments
A workaround is just to set |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions. |
Not fixed AFAIK |
any news on this issue? |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as a "Discussion" or add it to the "Backlog" and I will leave it open. Thank you for your contributions. |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information. |
If one has a
TextInput
and changes itsvalue
prop, selection behavior differs between iOS and Android. On iOS, the cursor jumps to the end. On Android, the cursor moves to the right by some varying amount.Also, if the
TextInput
has focus, on iOS noonSelectionChange
even is fired, but one is on Android.Finally, it would be nice if it were documented somewhere that the initial selection is at the end of the initial value.
Environment
Environment:
OS: macOS High Sierra 10.13.3
Node: 9.9.0
Yarn: 1.5.1
npm: 5.8.0
Watchman: 4.9.0
Xcode: Xcode 9.2 Build version 9C40b
Android Studio: Not Found
Packages: (wanted => installed)
react: 16.3.0-alpha.1 => 16.3.0-alpha.1
react-native: 0.54.2 => 0.54.2
Steps to Reproduce
See https://snack.expo.io/BJUeRfw5M
Expected Behavior
Consistent behavior between platforms. Jumping to the end of the line/value, perhaps, and firing an onSelectionChange event.
Documentation stating that the initial selection is at the end of the initial value.
Actual Behavior
On iOS, the cursor jumps to the end of the line, or the end of the replace text, sometimes. On Android, the cursor moves to the right by some varying amount.
Also, if the
TextInput
has focus, on iOS noonSelectionChange
even is fired, but one is on Android.The text was updated successfully, but these errors were encountered: