-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Clearing TextInput native value on Android #19036
Comments
Thanks for posting this! It looks like your issue may be missing some necessary information. Can you run Thank you for your contributions. |
I have updated react-native version to the latest and update everything in this post. Could anyone help with that and maybe provide some workaround to clear input completely on Android? Every help would be appreciated. |
Ok, after some digging again on the Internet, I've found other related pull request #12462 but it seems this bug still exists 😞 and also I have found workaround based on another module https://github.com/nikolaiwarner/react-native-text-input-reset 👍 |
It looks like your issue may refer to an older version of React Native. Can you reproduce the issue on the latest release, v0.55? |
yes |
Hey, we're having this issue too here but only on the Galaxy S8 and not on any other other of our test devices. What phone are you using? Thanks |
Samsung Galaxy A5 2016 |
samsung keyboard all device, same error! |
Seeing this on Galaxy J7, Samsung S6, Samsung S8, & Samsung S9 at least. |
Still an issue on slow devices even using react-native 0.55. |
Reproducable on my HTC 10 |
I also see this bug on android 6.0.
I know that we receive wrong values from Android sources: (last step)
It works correctly only when I do Any new state manipulation append new value to the end |
Still an issue on a samsung s7 and s8 @ "react-native": "0.55.3" |
There is a react-native module to solve that https://www.npmjs.com/package/react-native-text-input-reset and make sure to import |
👋 hey all, there was a PR for this to address the issue in React Native specifically #12462 - but the PR went stale due to lack of feedback from the author and others, see this comment. I'm going to close this issue given that there is a third-party workaround for now (as mentioned above) and that the PR above can be re-looked at (if someone can volunteer to do so ❤️). Thank you |
I have tried every way to clear input buffer on Android but every attemp failed. After clearing the input, on new typed letter the last word of cleared sentence is appearing. For instance: I wrote
foo foo
and clear that one. After that when I will try type again without hiding the native keyboard for examplereact
I would receivefooreact
.Environment
OS: macOS High Sierra 10.13.4
Node: 8.9.0
Yarn: 1.5.1
npm: 5.5.1
Watchman: 4.9.0
Xcode: Xcode 9.3 Build version 9E145
Android Studio: 3.0 AI-171.4443003
Packages: (wanted => installed)
react: 16.2.0 => 16.2.0
react-native: 0.52.0 => 0.55.0
Steps to Reproduce
Because of different approaches I have finished with something like that:
I also use
redux-form
to manage input data that's why componentWillReceiveProps is used.Expected Behavior
Should type without cleared
last word of sentence
prefix.Actual Behavior
Receiving
last word of cleared sentence
as prefix before every new value. Everything works fine when after clearing blur function is executed or manually hide the native keyboard. Then typed new value is withoutlast word of cleared sentence
as prefix.The text was updated successfully, but these errors were encountered: