React-native-navigation: [v3] TopBar behind StatusBar on push with visible flag change

Created on 15 Jul 2019  路  5Comments  路  Source: wix/react-native-navigation

Issue Description

When pushing a Screen on a Stack that was topBar: { visible: false } becoming topBar: { visible: true }, the TopBar is rendered behind the StatusBar:

Screenshot_1563192104

Steps to Reproduce / Code Snippets / Screenshots

To reproduce, use v3 playground app with following diff:

diff --git a/playground/src/screens/PushedScreen.js b/playground/src/screens/PushedScreen.js
index 23d7990d..38a9b8bb 100644
--- a/playground/src/screens/PushedScreen.js
+++ b/playground/src/screens/PushedScreen.js
@@ -30,7 +30,9 @@ class PushedScreen extends React.Component {
           id: 'singleBtn',
           text: 'single',
           testID: TOP_BAR_BTN
-        }
+        },
+        drawBehind: true,
+        visible: true,
       }
     };
   }
diff --git a/playground/src/screens/StackScreen.js b/playground/src/screens/StackScreen.js
index 002a8de2..8b33701b 100644
--- a/playground/src/screens/StackScreen.js
+++ b/playground/src/screens/StackScreen.js
@@ -24,7 +24,9 @@ class StackScreen extends React.Component {
         testID: STACK_SCREEN_HEADER,
         title: {
           text: 'Stack'
-        }
+        },
+        drawBehind: true,
+        visible: false,
       }
     }
   }

Steps:
1) Press "Stack" Button
2) Press "Push" Button


Environment

  • React Native Navigation version: v3 alpha 2
  • React Native version: 0.60
  • Platform(s) (iOS, Android, or both?): Android
  • Device info (Simulator/Device? OS version? Debug/Release?): Emulator API 28
Android acceptebug 馃搶 pinned

Most helpful comment

Should be fixed in .alpha-4. Thanks for reporting @danilobuerger 馃憤

All 5 comments

Same here https://github.com/wix/react-native-navigation/issues/5228#issuecomment-508996552. Thank you for reproduce in playground app. Because i could not find time to reproduce in the playground app.

@danilobuerger This might be caused by this line

@guyca Commenting that line works for the playground app. The top bar is then displayed beneath the status bar. I don't know about any side effects though that this will have.

any solution to this?

Should be fixed in .alpha-4. Thanks for reporting @danilobuerger 馃憤

Was this page helpful?
0 / 5 - 0 ratings