-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
Possible regression on #29292 #30770
Comments
@fabriziobertoglio1987 could you take a look at this? The issue is referencing a PR you a made a while ago. |
@safaiyeh thanks. Yes, I will reproduce the issue and try to find a solution during the weekend. Thanks a lot 🙏 ☮️ Hopefully I'll find an android method to get the correct height as some libraries like |
Thanks a lot @andres-torres-marroquin
I tested in my repo with react-native 0.63.2. My commit was introduced with 0.63.3
The results of the tests from your repo
I remain available and I'm sorry if I misunderstood or ignore this issue. I am willing to work during the weekends to fix this regression. Thanks a lot 🙏 Fabrizio |
Hi @fabriziobertoglio1987, thanks for you reply. Unfortunately, both examples don't show Full Screen I also emphasize that it happens when you have more than one ReactRootView on Android, on my repo there are two, the red one and the blue one. It won't happen on your repo since there you have only one ReactRootView. |
Thanks @andres-torres-marroquin can you override in the 2nd child ReactRootView? react-native/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java Lines 755 to 785 in 41b6884
with react-native/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java Lines 667 to 697 in 98309fa
like something (sorry if it not correct java logic): class ChildRootView extends ReactRootView {
@override
private void checkForKeyboardEvents() {
// copy paste and change the logic
}
} |
I cannot override that 2nd view, that is handled by P.S. If I were able to do it, for sure it would work. |
I'll send pr to public class ReactView extends ReactRootView implements IReactView, Renderable {
@Override
protected void checkForKeyboardEvents() {
super.checkForKeyboardEvents();
// copy below logic
}
} onMeasure should look like this react-native/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java Lines 667 to 697 in 98309fa
hopefully it will work, otherwise will think about something else. Thanks |
@fabriziobertoglio1987 I wonder about the behavior parity between iOS and Android, since on Android you could get multiple calls from keyboard events, if happens that you have more than one ReactRootView, I wonder if there is a way to do it as it is done on iOS, where you get the event triggered just once. (therefore depending of the app, might be a performance hit on Android) |
@fabriziobertoglio1987 this has become suddenly really important, since there is a bug for uploading files in 0.63.2 for iOS, so we either downgrade even further than 0.62.2, or compile the iOS app with 0.63.4 and the Android app with 0.63.2. How can this issue get more attention? |
It's seems that guy doesn't want to help to the community, what a shame |
@carlosalbertm comments like that aren't appreciated. @fabriziobertoglio1987 has been an amazing contributor to many React Native issues, help on issues like this would be appreciated from anyone including you 😁 @andres-torres-marroquin i would suggest speaking to the react-native-navigation team for more context! They are very responsive especially in their discord cc @guyca |
This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days. |
This issue was closed because it has been stalled for 7 days with no activity. |
Description
The issue #29292 makes a regression on the
keyboardDidHide
behavior for theAndroid platform, if it happens that you have multiple
ReactRootView
s on thesame application at once, the
keyboardDidHide
event happens for everyReactRootView
and the last event data will prevail.
Steps To Reproduce
Having multiple
ReactRootView
s is specially common usingreact-native-navigation
,in this example we provide two
ReactRootView
, one as main canvas (in red) and one on thetop right screen border (in blue), the event
keyboardDidHide
is triggered twice,where in the first trigger it sends the "right" value, because it is being triggered
by the main canvas (in red), and on the second trigger it sends the "wrong" value, since
it is being triggered by the top right screen view (in blue).
Comparing this behavior with the iOS counterpart the event is triggered only once
and it sends the right value, for this exact same code.
Snack, code example, screenshot, or link to a repository:
https://github.com/andres-torres-marroquin/RN29292
The text was updated successfully, but these errors were encountered: