@lavalogic/scoria 0.37.22 → 0.37.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -146,7 +146,16 @@ export function attachDropdownPortal(options) {
|
|
|
146
146
|
}
|
|
147
147
|
originalParent = dropdown.parentNode;
|
|
148
148
|
originalNextSibling = dropdown.nextSibling;
|
|
149
|
-
|
|
149
|
+
// Append the dropdown to the nearest open native `<dialog>` ancestor
|
|
150
|
+
// when one exists, otherwise to `document.body`. A `<dialog>` opened
|
|
151
|
+
// via `showModal()` renders in the browser's top layer, which sits
|
|
152
|
+
// above every z-indexed element in the regular stacking context.
|
|
153
|
+
// Without this hop the dropdown's `z-index: 10000` was still painted
|
|
154
|
+
// behind the dialog backdrop and its content (the symptom that
|
|
155
|
+
// surfaced as "select options disappear behind the allocate modal").
|
|
156
|
+
const dialogHost = trigger.closest('dialog');
|
|
157
|
+
const portalTarget = dialogHost && dialogHost.open ? dialogHost : document.body;
|
|
158
|
+
portalTarget.appendChild(dropdown);
|
|
150
159
|
// Tag the teleported dropdown so any "click outside the
|
|
151
160
|
// panel" / "click outside the trigger" handler elsewhere in
|
|
152
161
|
// the codebase can recognise the dropdown as a logical
|
package/dist/scss/_mixins.scss
CHANGED
|
@@ -633,8 +633,13 @@
|
|
|
633
633
|
|
|
634
634
|
.modal-main {
|
|
635
635
|
display: flex;
|
|
636
|
+
flex-flow: column nowrap;
|
|
636
637
|
flex-grow: 1;
|
|
637
|
-
// overflow-y: auto
|
|
638
|
+
// `overflow-y: auto` is the default for the modal body so long
|
|
639
|
+
// content (form fields, lists, etc.) scrolls inside the modal
|
|
640
|
+
// rather than pushing the footer buttons out of the viewport.
|
|
641
|
+
overflow-y: auto;
|
|
642
|
+
min-height: 0;
|
|
638
643
|
padding: sizing.$half-padding;
|
|
639
644
|
background-color: colours.$ui-blue-1;
|
|
640
645
|
|