-
-
Notifications
You must be signed in to change notification settings - Fork 100
Android: events are no longer received after reload from bundler #113
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
Comments
Thanks @rikardg |
I'm able to reproduce a problem. Looking for a solution 👀 |
Hi! The unmodified example from the repository works now. 👍 However, if I move the text input to the front page so that there is no screen navigation before it is displayed, it doesn't work for me on API level 28 and 24. It seems like the first show event is not received after a reload. However, the following hide event as well as subsequent show/hide events are all received. I've tested on:
To reproduce:
My modified import 'react-native-gesture-handler';
import * as React from 'react';
import { KeyboardProvider } from 'react-native-keyboard-controller';
import {
SafeAreaProvider,
initialWindowMetrics,
} from 'react-native-safe-area-context';
import Events from './screens/Examples/Events';
const spacerStyle = { marginVertical: 50 };
export default function App() {
return (
<SafeAreaProvider initialMetrics={initialWindowMetrics} style={spacerStyle}>
<KeyboardProvider statusBarTranslucent>
<Events />
</KeyboardProvider>
</SafeAreaProvider>
);
} |
@rikardg okay, thanks. I will try to test your example tomorrow 👍 |
#114) ## 📜 Description Use context provided by `createViewInstance` for view creation. ## 💡 Motivation and Context Partially fixes the problem described in #113 We need to use actual context provided by `createViewInstance`. Otherwise after hot reloading context may be invalid and keyboard events will not be send to JS thread (since UIManager will be invalid). ## 📢 Changelog ### Android - use `reactContext` from params instead of constructor value; ## 🤔 How Has This Been Tested? Tested manually on Pixel 7 Pro and Xiaomi Redmi Note 5 Pro (real devices). ## 📝 Checklist - [x] CI successfully passed
Hi @rikardg |
Hi, I've tested on a few different Android versions now (API level 24/physical, 31/33/emulator) with both the modified example from above as well as the app I'm working on. Works perfectly everywhere. So 👍 from me. Thank you for fixing this so quickly! |
@rikardg awesome! Then I will merge PR and will release |
Closed since https://github.com/kirillzyusko/react-native-keyboard-controller/releases/tag/1.4.3 has been published. |
First, thank you for your work on providing this package, it is much appreciated!
Issue
On Android, after a reload from the bundler, the keyboard events are no longer received. Steps to reproduce:
Expected behaviour is that events are still received after a reload.
Platform information
I have not built the example app for iOS, but the events are working properly in the app where the problem was discovered. This seems to be Android specific.
The text was updated successfully, but these errors were encountered: