File tree Expand file tree Collapse file tree
packages/react-native/ReactAndroid/src/main/java/com/facebook/react Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -956,11 +956,11 @@ private void checkForKeyboardEvents() {
956956
957957 boolean keyboardIsVisible = rootInsets .isVisible (WindowInsetsCompat .Type .ime ());
958958 if (keyboardIsVisible != mKeyboardIsVisible ) {
959+ Insets barInsets = rootInsets .getInsets (WindowInsetsCompat .Type .systemBars ());
959960 mKeyboardIsVisible = keyboardIsVisible ;
960961
961962 if (keyboardIsVisible ) {
962963 Insets imeInsets = rootInsets .getInsets (WindowInsetsCompat .Type .ime ());
963- Insets barInsets = rootInsets .getInsets (WindowInsetsCompat .Type .systemBars ());
964964 int height = imeInsets .bottom - barInsets .bottom ;
965965
966966 ViewGroup .LayoutParams rootLayoutParams = getRootView ().getLayoutParams ();
@@ -983,7 +983,7 @@ private void checkForKeyboardEvents() {
983983 sendEvent (
984984 "keyboardDidHide" ,
985985 createKeyboardEventPayload (
986- PixelUtil .toDIPFromPixel (mVisibleViewArea .height () ),
986+ PixelUtil .toDIPFromPixel (mVisibleViewArea .bottom + barInsets . bottom ),
987987 0 ,
988988 PixelUtil .toDIPFromPixel (mVisibleViewArea .width ()),
989989 0 ));
You can’t perform that action at this time.
0 commit comments