-
Notifications
You must be signed in to change notification settings - Fork 216
grid-block inside modal not scrollable #578
Comments
Generally grid blocks don't scroll, only content blocks. Looking at your markup, I would expect the first element (with the Edit: Unless the entire modal is a vertical grid, in which case I would expect all three elements to stack vertically. The top and bottom ones don't move, and the middle one scrolls. This is the intended behavior of the grid. |
@gakimball Yes this is for a vertical grid. The intended behavior is what I'm after, however, the grid system experiences this bug only when inside a modal. Let me find a smaller example to showcase my issue. |
@gakimball Here's a smaller example: <div class="grid-block vertical">
<div class="grid-content shrink text-center">
<h2>Modal Header</h2>
</div>
<div class="grid-block vertical">
<div class="grid-block shrink" ng-repeat="x in [1,2,3,4,5,6,7,8,9,10,11,12,13]">
<div class="grid-content">
<p>Content {{ x }}</p>
</div>
</div>
</div>
<div class="grid-content shrink text-center">
<a class="button primary">Next</a>
</div>
</div> Using the above modal template along with |
I wouldn't expect the Assuming you want to anchor elements at the top and bottom, and keep the middle open to show content, you can do this: <div class="grid-block vertical">
<div class="grid-content shrink text-center">
<h2>Modal Header</h2>
</div>
<div class="grid-content">
<div ng-repeat="x in [1,2,3,4,5,6,7,8,9,10,11,12,13]">
<p>Content {{ x }}</p>
</div>
</div>
<div class="grid-content shrink text-center">
<a class="button primary">Next</a>
</div>
</div> The top and bottom have |
@gakimball Using the exact markup you provided does not work as expected. Have you tried doing this inside a modal? All examples I've tried which have scrollable grid elements work as expected on a basic page, but not when inside a modal. I think I may have found the issue. The two root elements for a modal are shown below: <div class="modal-overlay" ...>
<aside class="modal" ...>
</aside>
</div> The aside.modal {
display: flex;
} |
@gakimball do you think my proposed change to add |
There needs to be a distinction between modals that use the grid and ones that don't. A plain modal has padding and is Whatever solution we use here should be applied to panels and off-canvas as well, which are two other components that have these two modes. |
Having the same issue - modal doesn't respect scrollable content. |
Was this ever fixed? Still having this issue. |
This hasn't been addressed yet. You'll have to apply the fix yourself with CSS. |
I'm trying to create a modal dialog that has a scrollable element. I'm using the modal factory with the following template:
When not inside a modal, the
.grid-block.vertical
element content is scrollable. I noticed there is anoverflow: hidden
set on the modal. When I change that tooverflow: scroll
I can scroll the modal, but I can't seem to get it so that only the.grid-block.vertical
element is scrollable and not the entire modal. Is this a bug or is there something I'm missing?The text was updated successfully, but these errors were encountered: