Skip to content

Commit 6619625

Browse files
committed
Fix clipped icon-circle by moving scroll to the overlay
The dialog card had `max-height: calc(100vh - 64px)` and `overflow-y: auto`, intended to handle tall forms. But the top icon-circle is positioned at `top: -32px` — it sticks out above the card. With `overflow-y: auto` on the card, that protruding icon was being clipped, leaving the dialog looking like a plain rectangle instead of the rounded card with the half-arc icon-circle on top (matching the confirm-dialog look). Move scroll handling to the overlay instead: - `.dialog-overlay` now has `overflow-y: auto` so the viewport itself scrolls if the card is taller than the screen. - `align-items: safe center` keeps short dialogs vertically centered but switches to top-aligned automatically when the card is tall — this is the modern CSS pattern that handles both cases. - Top/bottom padding bumped to 48px so the icon-circle has space even when the dialog is positioned at the top of the scroll area. - `.dialog-card` drops `max-height` and `overflow-y`, explicitly sets `overflow: visible` (with a comment explaining why it must stay visible) so the icon-circle is never clipped. The card now matches the confirm-dialog visual contract exactly: rounded 12px corners, the 64px icon-circle protruding 32px above the card with its half-arc colored border.
1 parent b3e9412 commit 6619625

1 file changed

Lines changed: 13 additions & 5 deletions

File tree

src/runtime/components/InputDialog.vue

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -472,18 +472,24 @@ defineExpose({
472472
opacity: 0;
473473
}
474474
475-
/* ----- Overlay ----- */
475+
/* ----- Overlay -----
476+
* The overlay carries the scroll, NOT the card. The card stays
477+
* `overflow: visible` so the icon-circle can protrude above it.
478+
* `safe center` keeps short dialogs vertically centered while
479+
* letting tall forms align to the top so the icon stays in view.
480+
*/
476481
.dialog-overlay {
477482
position: fixed;
478483
inset: 0;
479484
z-index: 10000;
480485
display: flex;
481-
align-items: center;
486+
align-items: safe center;
482487
justify-content: center;
483-
padding: 16px;
488+
padding: 48px 16px;
484489
background: rgba(15, 18, 24, 0.78);
485490
-webkit-backdrop-filter: blur(4px);
486491
backdrop-filter: blur(4px);
492+
overflow-y: auto;
487493
}
488494
489495
/* ----- Card ----- */
@@ -519,8 +525,10 @@ defineExpose({
519525
-webkit-font-smoothing: antialiased;
520526
-moz-osx-font-smoothing: grayscale;
521527
box-sizing: border-box;
522-
max-height: calc(100vh - 64px);
523-
overflow-y: auto;
528+
/* `overflow: visible` (default) — must NOT be `auto`/`hidden` or the
529+
* top icon-circle (positioned at `top: -32px`) gets clipped. The
530+
* overlay handles scrolling for long forms. */
531+
overflow: visible;
524532
}
525533
526534
.dialog-card:focus { outline: none; }

0 commit comments

Comments
 (0)