Modal backdrop displays over modal in fixed container
See original GitHub issueHaving a “main-container” with
.app-container {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
overflow-y: auto;
}
<div class="app-container">
<div class="modal">
....
</div>
</div>
Makes the backdrop position above the modal, blocking everthing.
Plunker: https://plnkr.co/edit/8JvG9eje5FDssHykPwW8?p=preview
(With angular where modal.html and modal.ts has code for autoopening modal and app.ts and app.scss has template for main window)
Edit Seems like using .appendTo('body') when opening modal is a workaround, i.e $('#exampleModal').appendTo('body').modal('show');
Issue Analytics
- State:
- Created 6 years ago
- Reactions:7
- Comments:10 (4 by maintainers)
Top Results From Across the Web
Bootstrap modal appearing under background - Stack Overflow
If the modal container has a fixed or relative position or is within an element with fixed or relative position this behavior will...
Read more >Bootstrap Modal Dialog showing under Modal Background
The easiest solution is to move the modal dialog outside of any container and just declare it under the <body> element, or -...
Read more >Modal - Bootstrap
Modals are built with HTML, CSS, and JavaScript. · Clicking on the modal “backdrop” will automatically close the modal. · Bootstrap only supports...
Read more >Bootstrap Modal Position - Visual LightBox
- Selecting the modal "backdrop" will quickly finalize the modal. - Bootstrap simply just supports a single modal pane at a time. Embedded...
Read more >Modal Options - W3Schools Tryit Editor
The backdrop option specifies whether the modal should have a dark overlay (the background color of the current page) or not. Modal with...
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

Was the best solution so far. The button that triggers the modal must be changed to a click action with a function containing the lines above.
This issue has marked as a won’t/can’t fix issue and a duplicate of #22801, #20433 or #3217.
Also in docs:
Another workaround is add
z-index: 1050to your.app-container.