-
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
Setting the value of a controlled TextInput breaks when autocorrect suggestion present #27019
Comments
There's a bug on iOS with TextInput when multiline=true and the value of the TextInput is programmatically changed. See facebook/react-native#27019.
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. |
This is still an 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. |
This is still an issue. |
Any news on this? |
Related issue: #28025 |
you did not provide the info, the issue was not flagged as Platform iOS |
@fabriziobertoglio1987 what info should be provided? Sorry, I'm not OP but I can help with my case. |
@rikur tried it before, didn't work well :( the textfield was popping in and out of editting state, not finishing at the desired state :( |
@fabriziobertoglio1987 should we do anything about this issue? Should I publish a new issue like this but with better details about the case? I mean, I have the same issue as OP. |
@Ashoat do we need to provide any more info about this? |
I don't think so, the repro should be enough. I wouldn't expect anybody to solve this for you anytime soon though. If you need it fixed the best solution would be to put up a PR. |
@backmeupplz I'm sorry. I don't work on iOS. I just work on Android. I hope somebody working on iOS will be bable to help you. Thanks a lot. Sorry I did not read the other emails. I wish you a good day. Fabrizio about the info, I was referring to the output from react-native info which allows the bot to add a Tag. I use that tag to filter Android issues as I don't work on iOS, but nevermind. Seems that the issue is tagged now. Thanks a lot. |
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. |
The Expo snack repro doesn't appear to work in Expo 47. Would somebody mind updating it so that this issue doesn't go stale? |
Updated the Snack: https://snack.expo.dev/@mhoran/trusting-peanut. |
This issue persists with React Native 0.76.0 and New Arch. |
This is also an issue for single-line TextInputs now as well, and and is not tied to old vs new architecture. As a workaround I was able to set The issue does not seem to repro in the Snack with single-line TextInput but on a device I see this behavior. It could have something to do with the speed of the device. |
Multiline input had been disabled to work around facebook/react-native#27019. However, that workaround no long seems to be working. Instead, disable autoCorrect, which does work around the above issue.
On iOS, something wonky happens when the value of a
TextInput
is programmatically modified (viasetState
and thevalue
property of saidTextInput
) and an autocorrect suggestion is present.The value of the text input ends up being set to the combination of the autocorrect suggestion and the programmatic value.
This only happens whenmultiline={true}
. Whenmultiline={false}
, all is fine.This seems only to be reproducible on iOS.
I was not able to reproduce on the Snack iOS simulator.This can be reproduced using the software keyboard in the Snack iOS simulator withmultiline={true}
. The Snack iOS simulator does not reproduce withmultiline={false}
, but this does reproduce on a device.React Native version: 0.59-0.76
Steps To Reproduce
Describe what you expected to happen:
I expected the value to be set to "Yo mhoran".
Snack, code example, screenshot, or link to a repository:
https://snack.expo.dev/@mhoran/trusting-peanut
The text was updated successfully, but these errors were encountered: