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.

Modal covers Views despite hierarchy

See original GitHub issue

I’ve got a loading spinner in a container view which is at the bottom of the view hierarchy (so it should be furthest forward). But when the modal comes up, it covers this loading view. I’m pretty sure that this wasn’t the case in an earlier version. Is there any way to fix this? Pictures below: screen shot 2017-07-31 at 11 31 05

The loading view has the following style, and since it’s below the Modal in the View hierarchy, it should be infront of the Modal:

{
        position: 'absolute',
        flexDirection: 'column',
        justifyContent: 'flex-end',
        top: 0.5 * Dimensions.get('window').height - 75,
        right: 0.5 *Dimensions.get('window').width - 75,
        height: 150,
        width: 150,
        backgroundColor: '#2F3138',
        opacity: 0.8,
        borderRadius: 10,
    }

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:5

github_iconTop GitHub Comments

5reactions
M-Jascommented, Aug 3, 2017

@gustaver after more digging I found a propType in here that is called ‘coverScreen’. As I said before Android was showing up over everything in the hierarchy and iOS was not(I wanted my modal over everything). I added “coverScreen={true}” and boom iOS modal was covering my screen. It’s possible that “coverScreen” might be automatically setting that prop for Android.

0reactions
M-Jascommented, Aug 2, 2017

@gustaver Are you trying to do this on Android or iOS? I have a similar setup and my Android version is ignoring the hierarchy, but iOS is not. I know this is not a solution, but I wanted to see if it could be an OS thing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Bring View on top of Modal using zIndex style with React-Native
You have to swap them. The greater is the z-index , the "higher" the element is in the view hierarchy. Try to put...
Read more >
Best Practices for Modals / Overlays / Dialog Windows
Sizing & Location. A modal window should not be too big or too small, you want it juuuuust right. The goal is to...
Read more >
Presenting a View Controller - Apple Developer
If the presenting view controller does not cover the screen, UIKit walks up the view controller hierarchy until it finds one that does....
Read more >
Taxonomy Hierarchy Management UI Pattern
The issue with this approach is that the user does not have a full view of the hierarchy, and making simple changes will...
Read more >
Modal design pattern
Modal windows interrupt users and force them into doing a specific action. Arguably, in most cases, there is no need to force users...
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