Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
diff --git a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java
index ed1aba8..0a9284f 100644
--- a/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java
+++ b/node_modules/react-native/ReactAndroid/src/main/java/com/facebook/react/ReactRootView.java
@@ -891,7 +891,9 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
sendEvent(
"keyboardDidHide",
createKeyboardEventPayload(
- PixelUtil.toDIPFromPixel(mVisibleViewArea.height()),
+ // Use mLastHeight to account for the translucent status bar, and fall back to getMeasuredHeight() on Bridgeless mode.
+ // Remove this patch once the upstream fix for https://github.com/facebook/react-native/issues/47140 is released.
+ PixelUtil.toDIPFromPixel(mWasMeasured ? mLastHeight : getMeasuredHeight()),
0,
PixelUtil.toDIPFromPixel(mVisibleViewArea.width()),
0));
@@ -940,7 +942,9 @@ public class ReactRootView extends FrameLayout implements RootView, ReactRoot {
sendEvent(
"keyboardDidHide",
createKeyboardEventPayload(
- PixelUtil.toDIPFromPixel(mVisibleViewArea.height()),
+ // Use mLastHeight to account for the translucent status bar, and fall back to getMeasuredHeight() on Bridgeless mode.
+ // Remove this patch once the upstream fix for https://github.com/facebook/react-native/issues/47140 is released.
+ PixelUtil.toDIPFromPixel(mWasMeasured ? mLastHeight : getMeasuredHeight()),
0,
PixelUtil.toDIPFromPixel(mVisibleViewArea.width()),
0));