Skip to content

Commit

Permalink
fix(modal): scrolling multple modals positioning
Browse files Browse the repository at this point in the history
When multiple modals are used and one of them got the scrolling class, the other non scrolling modals are position shifted right before they get hidden/overlayed
  • Loading branch information
lubber-de authored Mar 3, 2023
1 parent cb680cb commit 81f7c2c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/definitions/modules/modal.less
Original file line number Diff line number Diff line change
Expand Up @@ -437,19 +437,22 @@
overflow: hidden;
}
.scrolling.dimmable > .dimmer {
justify-content: flex-start;
justify-content: center;
position: fixed;
}
.scrolling.dimmable:not(body) > .dimmer {
justify-content: center;
position: absolute;
}
.scrolling.dimmable.dimmed > .dimmer {
overflow: auto;
overscroll-behavior: @overscrollBehavior;
}
.modals.dimmer .ui.scrolling.modal.fullscreen {
top: 0;
}
.modals.dimmer .ui.scrolling.modal:not(.fullscreen) {
margin: @scrollingMargin auto;
top: @scrollingTop;
}

/* Fix for Firefox, Edge, IE11 */
Expand Down
1 change: 1 addition & 0 deletions src/themes/default/modules/modal.variables
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@
/* Scrolling Margin */
@scrollingMargin: 2rem;
@mobileScrollingMargin: @mobileTopAlignedMargin;
@scrollingTop: 1em;

/* Scrolling Content */
@scrollingContentMaxHeight: calc(80vh - 10rem);
Expand Down

0 comments on commit 81f7c2c

Please sign in to comment.