Does iOS manage multiple keyboard states when using native stacks? #1080
Replies: 2 comments 2 replies
-
I think I've seen something similar. Basically it's impossible to have two opened keyboard at the same time. iOS/Android have a single keyboard instance shared across multiple view-controllers/activities. But on an iOS keyboard can be associated with a particular screen, yes, especially if you use native-stack. Does such behavior cause a problem for you? Could you add more info, what exactly are you experiencing and what is the desired behavior in your case? 🙏 P.S. I know that react-native-screens (native-stack) may snapshot/screenshot a screen during back transitions, but starting from iOS 17 or 18 keyboard snapshoting is not allowed anymore (again, it's what I remember). You can try to add animation/video/gif on a previous screen and check - if it's playing there that means it's not a snapshot view. If it's frozen then it's a snapshot :) |
Beta Was this translation helpful? Give feedback.
-
I haven't yet made it into a minimal repro or a PR on the example apps, but I'm seeing an issue like this in my app:
keyboard-issue.movThis is iOS 26 (but reproducible on iOS 18), new arch, expo-router, multiple nested native stacks, keyboard-controller up-to-date to today's version, expo SDK 53. Desired behavior would be either for this keyboard not to display, or (arguably better in some cases) for it to be handled smoothly, with the sticky view animation not playing (I guess it would require some sort of by-screen keyboard context, if that does even make sense, it seems... ambitious) I've added an animation (a basic reanimated style), which is moving → that's not a snapshot I guess? I'll try to push a repro today or tomorrow 🙂 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
There's one thing I've been wondering is: RNKC seems to maintain a "global" keyboard state for the entire app.
But sometimes on iOS you see that the keyboard seems linked to a particular screen. It's well visible when performing a back gesture like this:
Note that just having a native stack with a TextInput and 2 screens does not seem to be enough to get this behavior, I'm not sure yet what else is needed exactly.
This behavior can be seen in the slack app sometimes, but I've not seen it in many other apps.
I don't have a precise issue with a minimal repro to report for now but I was wondering if anyone had already dug on this and might have an explanation on what's happening here 🙂 Are there multiple keyboard states on the native side / is it an iOS bug/glitch?
Beta Was this translation helpful? Give feedback.
All reactions