question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Statusbar turns white when the modal is open (only on certain devices)

See original GitHub issue

Environment

Diagnostics

Steps to Reproduce

Create a new Expo app and just show a modal with the transparent prop set to true.

Expected Behavior

The modal should open and show the statusbar beneath it.

Actual Behavior

The modal opens and shows a white statusbar. Screenshot example

Reproducible Demo

import React from "react";
import { Modal, View } from "react-native";

export default class App extends React.Component<{}> {
  render() {
    return (
      <View style={{ flex: 1 }}>
        <Modal transparent={true} style={{ flex: 1 }}>
          <View style={{ backgroundColor: "blue", flex: 1 }} />
        </Modal>
      </View>
    );
  }
}

The issue has been reported multiple time here.

The following devices have the issue:

  • Google Nexus 9 - 6.0.0 - API 23
  • Google Nexus 5 - 5.1.0 - API 22

The following devices work as expected:

  • 10.1_WGXA_Tablet_API_26

I guess it might be related to the API then, as the StatusBar Expo docs suggest.

Please notices that apps created using react-native (react-native init AppName) work correctly on all devices mentioned above, only Expo apps have the issue.

Let me know if you need further infos!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
GollyJercommented, May 28, 2018

Hi. Was troubleshooting this today and landed here. Someone did come up with a fix but their package requires react-native link.

Maybe the code can inspire a fix on the Expo side? https://github.com/listenzz/react-native-modal-translucent

0reactions
AdamJNavarrocommented, Feb 7, 2019

Hey @mmazzarolo,

In an effort to clean up and gain more clarity over our issues, we’re closing old issues that may no longer apply to our currently supported versions. If you are able to still repro this, please open a new issue with a repro case and we’ll be happy to investigate.

Cheers,
Adam

Read more comments on GitHub >

github_iconTop Results From Across the Web

The statusbar turns white when the modal is open (only on ...
When the modal is visible, status bar is hidden but instead there is an empty white block at the top with the exact...
Read more >
react native modal status bar is white not transparent
This library doesn't completely hide the status bar but makes it transparent instead of white. No codes required.
Read more >
react native android 12 status bar text turns white - You.com
React Native with Expo Status Bar showing white on Android and content pushed ... statusbar turns white when the modal is open (only...
Read more >
Status bar stays black even when set to light - Apple Developer
Now I made app structured as master-detail control and set in split controller status bar to be light (white). In Storyboard, all controllers...
Read more >
Cannot Edit Text Inside A React Modal With State To Edit Task ...
Solvedreact native modal The statusbar turns white when the modal is open only on certain devices ; nidaorhan.138.I have a component with status...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found