Closed iliaskap12 closed 2 years ago
have you found a solution for this?
have you found a solution for this?
Downgrading to 3.11 solved the issue. I don't know what the root cause is but it is definitely something in the latest release.
I also had the same issue, and downgrading helped. I think it's because of the new architecture that's included in the latest release.
Downgrading worked for me. I have kept "react-native-screens": "3.4.0" and the keyboard issue worked
This issue is due to the latest version of react native screens and i was facing the same issue on Android and i tried to solve this issue using screen options but nothing worked so the only thing that can fix this issue is downgrading the react native screens
version.
Before this issues: "react-native-screens": "^3.11",
and i simply replaced IT with below version and it worked π
"react-native-screens": "3.4.0",
Downgrading didn't help me. This randomly started happening to me on an older version of react-navigation/stack (5.14.5)
Ended up switching to navigation package to react-navigation/native-stack (6.5.0) and that did the trick.
Packages before (broken): "@react-navigation/drawer": "^5.12.5", "@react-navigation/material-top-tabs": "^5.3.15", "@react-navigation/native": "^5.9.4", "@react-navigation/stack": "^5.14.5", "react-native-safe-area-context": "^3.2.0", "react-native-screens": "^3.2.0"
Packages after (fixed): "@react-navigation/drawer": "^6.3.1", "@react-navigation/material-top-tabs": "^6.1.1", "@react-navigation/native": "^6.0.8", "@react-navigation/native-stack": "^6.5.0", "@react-navigation/stack": "^6.1.1", "react-native-safe-area-context": "^3.4.1", "react-native-screens": "^3.12.0"
This was pretty non-intrusive as I test on a physical device anyways and did not require an upgrade on react or react-native packages
TL;DR
One of the limitations of the expo managed workflow is you have to use a specific version of a native library supported by the Expo SDK. Use expo install react-native-screens
command to install dependencies within expo managed workflow.
Hello everyone! :wave:
react-native-screens@3.12
won't correctly work within Expo managed workflow. Let me explain π§βπ«
Managed workflow comes with an Expo Go app that has to be compiled, build, and released to Google Play & App Store. In order for this to work, Expo SDK comes with a bunch of precompiled react-native libraries.
Libraries that are JavaScript-only (eg. react-navigation) can be swapped on the fly but the native ones (eg. react-native-screens
, react-native-safe-area-context
, react-native-gesture-handler
) have to have a specific version bundled inside the SDK. Expo SDK 44 comes with react-native-screens@3.10.x
.
Making sure that your app uses correct versions of the dependencies is a lot of work and because of that Expo comes with a handy expo install
command in place of yarn/npm which automatically manages correct versions. See this part of react-navigation's docs about installing dependencies into an expo managed project.
To learn more check workflow comparison and the limitations sections of the Expo's documentation.
Cheers π
Hi @kacperkapusciak I just wanted to confirm we are not on managed expo (we use bare expo) and we experience this on screens 3.13.3. We had to downgrade to screens 3.11.0 in order to workaround this bug. Should this ticket be reopened?
I can confirm that this issue is happening in non-Expo builds as well. What solved for me was to downgrade to v3.10.2
and in package.json
make sure you are not using ^3.10.2
cos it will install the latest v3.13.1
instead.
Hey @kacperkapusciak any chance you could reopen this? I just want to make sure it's still a known issue outside of expo managed and on versions > 3.11.0
Another confirmation of non-expo build experiencing this issue still. As per above, downgrading to 3.11.0 fixed the issue
React native 0.68 changed android:windowSoftInputMode="adjustPan"
to android:windowSoftInputMode="adjustResize"
.
This will result in keyboard disappearing in cases where text field would be left under the keyboard so be sure to check that it is set to adjustPan
if you encounter flickering.
Another confirmation of non-expo build experiencing this issue still. As per above, downgrading to 3.11.0 fixed the issue
@matthieunelmes What RN version are you running? 3.11.0 doesn't work to me with RN 0.64
Another confirmation of non-expo build experiencing this issue still. As per above, downgrading to 3.11.0 fixed the issue
@matthieunelmes What RN version are you running? 3.11.0 doesn't work to me with RN 0.64
working for me "react-native-screens": "3.4.0", on "react-native": "0.64.1",
With version 3.4.0 result in this error:
None of these files exist:
* node_modules/react-native-screens/src/TransitionProgressContext(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
* node_modules/react-native-screens/src/TransitionProgressContext/index(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
Another confirmation of non-expo build experiencing this issue still. As per above, downgrading to 3.11.0 fixed the issue
@matthieunelmes What RN version are you running? 3.11.0 doesn't work to me with RN 0.64
@mtoninelli RN 0.65.1 and react-native-screens 3.11.0
you need to update your navigation stack and native dependencies to the latest, it will solve the issue.
Yes, I confirm that the issue has been solved updating react navigation.
"@react-navigation/bottom-tabs": "^6.3.1",
"@react-navigation/elements": "^1.3.3",
"@react-navigation/native": "^6.0.10",
"@react-navigation/native-stack": "^6.6.2",
"react-native-screens": "^3.13.1",
"react": "17.0.2",
"react-native": "0.65.1",
you need to update your navigation stack and native dependencies to the latest, it will solve the issue.
Updating to the latest navigation stack (v6) & dependencies did not solve this issue for me.
@react-navigation/core@6.2.2
@react-navigation/drawer@6.4.3
@react-navigation/elements@1.3.4
@react-navigation/native@6.0.11
@react-navigation/stack@6.2.2
react-native-screens@3.15.0
react@17.0.2
react-native@0.65.2
To circumvent this issue I had to downgrade to react-native-screens@3.11.1
This happens on a detail screen for me on a stack navigation. Doesn't happen on the same class on the main screen. Downgrading isn't ideal. You're compromising a lot of other bug fixes for one issue and in the end, it might not even work - downgrading screens and upgrading navigation certainly didn't work for me.
Solution is to update AndroidManifest
. I'm assuming majority has adjustResize
. Update it to android:windowSoftInputMode="stateAlwaysHidden|adjustPan"
or try to other options that fits your needs.
"adjustResize": The activity's main window is always resized to make room for the soft keyboard on screen.
"stateAlwaysHidden": The soft keyboard is always hidden when the activity's main window has input focus.
"adjustPan": The activity's main window is not resized to make room for the soft keyboard. Rather, the contents of the window are automatically panned so that the current focus is never obscured by the keyboard and users can always see what they are typing. This is generally less desirable than resizing, because the user may need to close the soft keyboard to get at and interact with obscured parts of the window.
Docs: https://developer.android.com/guide/topics/manifest/activity-element#wsoft
λ€μ΄ κ·Έλ μ΄λλ μ μκ² ν¨κ³Όμ μ΄μμ΅λλ€. "react-native-screens": "3.4.0"μ μ μ§νκ³ ν€λ³΄λ λ¬Έμ κ° μλνμ΅λλ€.
I also had a problem with the keyboard suddenly closing on my Android phone one day, so I reinstalled the react-native-screens
version to '3.4.0' and it was solved.
Currently part of my package.json
"react": "17.0.1",
"react-native": "0.64.2",
"react-native-reanimated": "2.2.0",
"react-native-screens": "^3.4.0", // before ^3.3.0
anyone having this issue on iOS?
currently working fine for me on android, but on iOS keyboard closes as soon as focus is set
@react-navigation/native-stack@6.6.2 βββ @react-navigation/native@6.0.10 βββ react-native-screens@3.18.2 βββ react-native@0.68.2
alguΓ©m tendo esse problema no iOS? atualmente funcionando bem para mim no android, mas no iOS o teclado fecha assim que o foco Γ© definido
@react-navigation/native-stack@6.6.2 βββ @react-navigation/native@6.0.10 βββ react-native-screens@3.18.2 βββ react-native@0.68.2
Usei a versΓ£o "react-native-screens": "3.4.0"
e deu super certo aqui
I have these issues currently.
Having this issue on android currently. Using expo and all dependencies are up to date.
Same here. Using a pure react native project, not expo. Keyboard closes on first focus. Its exactly this issue
I had the same issue. My problem was that I prewrote functions like Login, Reg and so on and called them in main App function. When I removed bodies of functions to main App function directly, prolblem solved. Try it and update me.
Facing the same issue on expo. Tried downgrading react-native-screens to @3.11 and also @3.4 however this did not solve the problem.
@kacperkapusciak Can we reopen? Seems like lots of people still have the issue on iOS.
Hi @Pingou, I believe there's already an open issue that also mentions the bug reported here - #1447. We're aware of this problem and it still waits for investigation, but unfortunately it's not that easy to investigate the place where this error occurs. If you believe that you might have an idea how you can fix this, we're always open for the PRs with bug fixes β€οΈ
As this PR causes the discussion to be separated between both this issue and #1447 I'll lock the discussion here, so please discuss this issue further there.
Thank you for your patience! β€οΈ
Description
When the input of a TextInput component is pressed, the keyboard pops up and immediately closes again. This happens inside a stack navigation screen. However, the issue doesn't seem to be of react-navigation (solutions in issue #8414 don't solve the problem). What solved the issue was downgrading from react-native-screens@3.12 to react-native-screens@3.11
Screenshots
Steps To Reproduce
Expected behavior
When the TextInput component is pressed (focused), the keyboard opens and remains open.
Actual behavior
When the TextInput component is pressed (focused), the keyboard opens and immediately closes again.
Reproduction
Minimal code example
Platform
Workflow
- [ x ] Managed workflow
Package versions
@babel/core is a development dependency.