I have a screen A and B. Screen A contains my angular app content div, containing a button. Screen B contains backdrop with a modal. Clicking button in screen A makes screen B visible.
I use Angular with an *ngIf to show/hide screen B.
The problem is that when screen B appears (backdrop and modal) the button clicked in screen A appears on top (greater-Z-index-like) of screen B untill something else is clicked. I've tried changing the Z-index of screen B to a high number without luck. Anyone familiar with this behavior? I will add screenshots to illustrate my problem.
The backdrop and modal in screen B are nested divs with the following CSS:
.modalWrapper {
z-index: 2;
min-height: 100%;
position: fixed;
width: 100%;
background: rgba(0, 0, 0, 0.4);
top: 0;
left: 0;
}
.modalContent {
background-color: #fff;
box-shadow: 0 1px 1px rgba(0,0,0,.24), 0 0 1px rgba(0,0,0,.12);
position: fixed;
width: 500px;
min-height: 300px;
max-height: 415px;
overflow-y: auto;
left: 0;
right: 0;
top: 0;
bottom: 0;
margin: auto;
padding: 25px;
z-index: 3;
}