-
Notifications
You must be signed in to change notification settings - Fork 24k
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 closes automatically when opened on android #33164
Comments
Same here, I can confirm that on ios it works fine, but on android we have the same problem. |
same here |
Having the same issue on Android |
Hey all, asked the same thing on StackOverflow and the answer I accepted solved my issue. See if it fixes your problem too. |
Sadly, for me it had no impact, i am still facing same issue. |
Appears to be working for me, thanks! |
It is working now. Thanks |
Try to clean your gradle cache. It was not working for me at first. |
Thanks, yesterday after clean i managed to run it with 3.4.0 version, today i tried 3.10.2 and it seems to work as well. |
sadly still facing issues with this one , nothing worked for me , what version of native-screens did you exactly used? |
Unfortunately, none of the above solutions worked for me. Even I've tried multiple versions of react-native-screens, but no luck. |
Finally, made it work the issue I had was that I upgraded to 3.10.2 and not ~3.10.2. Give it a go. Hope this helps. |
Same for me too. None of the solutions worked |
Me funciono, Gracias |
same issue Also, My cardStyleInterpolator is also not working, is this issue related to react-native-screens ? |
Saved my day S2 |
This worked for me |
Please upgrade react-native-screens to latest version. "react-native-screens": "^3.13.1". This worked for me. |
Not working with 3.13.1 |
When changing the version to
|
Upgarde your stack and native dependencies in package.json to the latest, issue will be resolved. |
|
Worked like a charm....Saved my day.... |
There's an open issue in react-native-screens: |
Got the same issue but using react-native-navigation (not react-navigation), so there are no react-native-screens package. Issue was peproducing only on android 12 for input inside scroll view. FIxed by setting |
Thanks, this is what fixed it for me |
After scratching my head for hours, I find this solution that worked for me. 1: Go to your AndroidManifest.xml file update the property from this (android:windowSoftInputMode="adjustResize") to this (android:windowSoftInputMode="stateAlwaysHidden|adjustPan"). 2: Re-run the project and see the magic. |
Change the line in AndroidManifest.xml Old line |
I have a similar issue on Android. |
This worked for me with react-navigation, thanks ! |
Adding |
never mind even ^that didn't work... it was a one-off where it worked & then it went back to being as it was |
@pandyama you can try my solution which I mentioned above. |
@Malik-Usman17 I am building a react native project, there is no android xml. But the way I was able to fix it was by moving the textInput component out i.e I am using a loading state to manage when the API call is happening so i have something like |
@pandyama AndroidManifest.xml exists in react native projects unless you're using expo. |
@KrisLau sorry ya its an Expo project & i didnt know this, thanks for clarifying! |
the solution provided here is giving me build errors |
Recently encountered this issue and none of the above solutions worked. Was using RN 0.65.3, which is somewhat outdated, upgraded it to 0.66.0 and the problem just went away. Go figure. |
i just change from |
but the drawback is you have to wrap all of your code using |
I updated react-native from 0.64.3 to 0.66.5 and it worked like a charm. Maybe it also works with some version of 0.65.x |
@germanmb23 Those versions are really old and you'll likely need to migrate to the 0.70+ versions (current is 0.74 as of writing) to avoid a lot of compatibility issues with other libraries eventually if you're not already encountering them. |
Description
Hi there,
I switched laptops and cloned the repository of my project, did a quick yarn install and looks like it was a big difference from the one on the main branch but I didn't bother since maybe it's just because of different Node versions.
Now every time I click on one TextInput the keyboard opens and closes immediately only on android. I attached a quick recording here. Tried some solutions and it looks like switching android:windowSoftInputMode from adjustResize to adjustPan in AndroidManifest.xml fixes the problem with the closing but I'm not really happy with the behaviour of the keyboard in the app when it's set to adjustPan.
Version
0.64.0
Output of
npx react-native info
Steps to reproduce
Not really sure what could be the steps to reproduce. Maybe this issue starting happening a while ago but I just saw it now.
Snack, code example, screenshot, or link to a repository
Here is just an input centered inside a simple View.
https://gfycat.com/ordinaryquestionabledinosaur
The text was updated successfully, but these errors were encountered: