The Issue:
When using flexbox with overflow in a full-size app layout (100% width, 100% height), the scrollbars fail to appear for overflow-y in Firefox, IE, or Edge. The problem is specific to these browsers as it displays correctly in Chrome. Instead of showing a vertical scrollbar within the element, the entire page gets the scrollbar.
Attempts at Solution:
I have attempted the suggested fix found in various SO answers, which involves adding min-height: 0;
to the flex elements/parents. However, despite trying this solution, I have yet to make it work, and I suspect there might be something missing from my implementation.
Screenshots:
Chrome:
https://i.sstatic.net/QFxBj.png
Firefox:
https://i.sstatic.net/GdmOV.png
Example:
https://codepen.io/gunn4r/pen/WEoPjN
html {
height: 100%;
}
.flex-grow {
flex: 1;
}
.canvas-wrapper {
overflow: scroll;
}
.canvas {
width: 3000px;
height: 3000px;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" rel="stylesheet" />
<body class="h-100">
<div class="h-100 container-fluid d-flex flex-column">
<div class="row bg-warning">
<div class="col-12 py-4">Top Bar</div>
</div>
<div class="row no-gutter flex-grow">
<div class="col-9 px-0 d-flex flex-column">
<div class="canvas-wrapper">
<div class="canvas bg-success">
Canvas
</div>
</div>
<div class="bg-danger py-3">
Canvas Footer
</div>
</div>
<div class="col-3 bg-primary">
<div class="sidebar-item">Sidebar</div>
</div>
</div>
<div class="row bg-warning">
<div class="col-12 py-2">Overall Footer</div>
</div>
</div>
</body>