Statusbar turns white when the modal is open (only on certain devices)
See original GitHub issueEnvironment
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:
- Created 6 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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
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