Skip to content

Commit 81f7c2c

Browse files
authored
fix(modal): scrolling multple modals positioning
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
1 parent cb680cb commit 81f7c2c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/definitions/modules/modal.less

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,19 +437,22 @@
437437
overflow: hidden;
438438
}
439439
.scrolling.dimmable > .dimmer {
440-
justify-content: flex-start;
440+
justify-content: center;
441441
position: fixed;
442442
}
443443
.scrolling.dimmable:not(body) > .dimmer {
444-
justify-content: center;
445444
position: absolute;
446445
}
447446
.scrolling.dimmable.dimmed > .dimmer {
448447
overflow: auto;
449448
overscroll-behavior: @overscrollBehavior;
450449
}
450+
.modals.dimmer .ui.scrolling.modal.fullscreen {
451+
top: 0;
452+
}
451453
.modals.dimmer .ui.scrolling.modal:not(.fullscreen) {
452454
margin: @scrollingMargin auto;
455+
top: @scrollingTop;
453456
}
454457

455458
/* Fix for Firefox, Edge, IE11 */

src/themes/default/modules/modal.variables

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@
133133
/* Scrolling Margin */
134134
@scrollingMargin: 2rem;
135135
@mobileScrollingMargin: @mobileTopAlignedMargin;
136+
@scrollingTop: 1em;
136137

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

0 commit comments

Comments
 (0)