diff --git a/frontend/src/components/date/DatepickerWithRange.vue b/frontend/src/components/date/DatepickerWithRange.vue index ab867ecb6..8ef4bc604 100644 --- a/frontend/src/components/date/DatepickerWithRange.vue +++ b/frontend/src/components/date/DatepickerWithRange.vue @@ -86,7 +86,6 @@ ({ popupElement.style.zIndex = '20000' popupElement.id = 'filter-autocomplete-popup' popupElement.appendChild(component.element!) - document.body.appendChild(popupElement) + // Append to the closest dialog (if inside a modal) so the popup + // is not blocked by inertness, otherwise fall back to body. + const parentDialog = view.dom.closest('dialog') + ;(parentDialog || document.body).appendChild(popupElement) cleanupFloating = autoUpdate(virtualReference, popupElement, updatePosition) } diff --git a/frontend/src/components/misc/CustomTransition.vue b/frontend/src/components/misc/CustomTransition.vue index 23f406a20..cb7fc9dc5 100644 --- a/frontend/src/components/misc/CustomTransition.vue +++ b/frontend/src/components/misc/CustomTransition.vue @@ -7,7 +7,7 @@ @@ -130,20 +161,49 @@ onBeforeUnmount(() => { $modal-margin: 4rem; $modal-width: 1024px; -.modal-mask { +.modal-dialog { + // Reset UA dialog styles + padding: 0; + border: none; + background: transparent; + color: #ffffff; + // Fill viewport position: fixed; - z-index: 4000; - inset-block-start: 0; - inset-inline-start: 0; + inset: 0; inline-size: 100%; block-size: 100%; - background-color: rgba(0, 0, 0, .8); - transition: opacity 150ms ease; - color: #ffffff; + max-inline-size: 100%; + max-block-size: 100%; + + // Transitions + opacity: 0; + transition: opacity 150ms ease, + display 150ms ease allow-discrete; + + &[open]:not([data-closing]) { + opacity: 1; + + @starting-style { + opacity: 0; + } + } + + &::backdrop { + background-color: rgba(0, 0, 0, 0); + transition: background-color 150ms ease, + display 150ms ease allow-discrete; + } + + &[open]:not([data-closing])::backdrop { + background-color: rgba(0, 0, 0, .8); + + @starting-style { + background-color: rgba(0, 0, 0, 0); + } + } } .modal-container { - transition: all 150ms ease; position: relative; inline-size: 100%; block-size: 100%; @@ -151,6 +211,7 @@ $modal-width: 1024px; overflow: auto; padding-block-start: env(safe-area-inset-top); padding-block-end: env(safe-area-inset-bottom); + } .default .modal-content, @@ -161,7 +222,7 @@ $modal-width: 1024px; inset-block-start: 50%; inset-inline-start: 50%; transform: translate(-50%, -50%); - + [dir="rtl"] & { transform: translate(50%, -50%); } @@ -190,7 +251,7 @@ $modal-width: 1024px; max-block-size: none; // reset bulma overflow: visible; // reset bulma - + @media not print { max-inline-size: $modal-width; } @@ -212,8 +273,6 @@ $modal-width: 1024px; } .hint-modal { - z-index: 4600; - :deep(.card-content) { text-align: start; @@ -244,7 +303,7 @@ $modal-width: 1024px; } @media print, screen and (max-width: $tablet) { - .modal-mask { + .modal-dialog { overflow: visible !important; } @@ -285,7 +344,7 @@ $modal-width: 1024px; .modal-content :deep(.card .card-header-icon.close) { display: none; - + @media screen and (max-width: $tablet) { display: block; } @@ -294,12 +353,12 @@ $modal-width: 1024px;