-
-
Notifications
You must be signed in to change notification settings - Fork 527
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
react-native-screens@v4
breaks keyboard-controller
#2554
Comments
Hey! 👋 The issue doesn't seem to contain a minimal reproduction. Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem? |
react-native-screens@v4
breaks keyboard-controller
Issue does contain a minimal reproduction repo 🤞 |
I think I know what the case is. Most likely you register on decor view (or some view beneath) to listen for keyboard inset updates & I'm need to do the same overwriting your listener. This is a serious issue, but we are limited by Android - i.e. only single listener is supported for given view & there is no way to check whether a view has listener or not (am I right here? Haven't verified this, will do on Monday), so most likely it works both ways - I do not know what is the best way forward yet 🤷🏻♂️ Edit: also I'm writing from top of my head; will verify the issue on Monday |
Right, I'm adding my own view under
Right, only a single listener is allowed. That's why I add my own view (in order not to break other libs).
What happens if you also add a child to |
It is not that straightforward unfortunately. v4 comes with the "legacy" (in the light of edge-to-edge) What I wonder now is where do I consume the insets, so that you don't get them below the decor view. Only place that comes to my mind right now are the form sheets on Android, which handle keyboard natively by them selves. I think I could have got insets handling there |
Well, I haven't checked yet, but maybe, yes What I'm also confused is that (as you wrote) you were using that approach with attaching to Will try to allocate some time to look into a fix 👀 |
Description
I just discovered this problem so I don't see an entire picture in my head yet, though what I can see is:
keyboard-controller
because sometimes everything works, sometimes notViewCompat.setOnApplyWindowInsetsListener(view, this)
andViewCompat.setOnApplyWindowInsetsListener(view, null)
then keyboard-controller constantly receives eventsI'm still in the beginning of my very early investigation, but decided to open an issue to keep people aware and to track a progress here 👀
Steps to reproduce
Expected behavior
keyboard controller can receive events and propagate them to JS
Actual behavior
Native side of keyboard-controller doesn't receive keyboard events
Snack or a link to a repository
https://github.com/NyoriK/keyboard-controller-test-project
Screens version
4.1.0
React Native version
0.76.3
Platforms
Android
JavaScript runtime
Hermes
Workflow
Expo bare workflow
Architecture
Fabric (New Architecture)
Build type
Debug mode
Device
Android emulator
Device model
Pixel 8 Pro API 35
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: