forge
Explore
Log in

Don't you dare go Hollow

Confirm pops overlay the page instead of scrolling it

Browse files at this commit

1abf2417050fba13afd80c39ec573a4eda74b977Ahmet Kaan GümüşParent: 01ad124
Opening a Rotate/Revoke confirm grew the page: the pop was absolutely
anchored under its button, inside .admin-table-wrap — a scroll container
since it takes the tables' sideways scroll, and a non-visible x-axis
forces the y-axis to auto, so the pop extended that scroll area (the
long page thumb) instead of overlaying the screen.

Port iz's delete-confirm model: the open pop is position:fixed and
viewport-centered, which escapes every overflow ancestor, reads as the
page's one dialog, and is row-agnostic — the first row's pop and the
last row's pop land identically at any width. The im pop keeps its own
compact box and flat shadow. Verified in a browser at 900px and 1400px,
first and last rows: documentElement scrollWidth == clientWidth and
scrollHeight == clientHeight while the pop is open, pop fully inside
the viewport, Revoke unobscured.
style/main.scssmodified+12 -3
@@ -1195,15 +1195,24 @@ body:has(.log-list) {
1195 }1195 }
1196 1196
1197 .admin-confirm-pop {1197 .admin-confirm-pop {
1198- position: absolute;1198+ // Viewport-fixed and centered, iz's delete-confirm model: position:fixed
1199- right: 0;1199+ // escapes every overflow ancestor, and the table wrap is a scroll
1200- top: calc(100% + 6px);1200+ // container (it takes the tables' sideways scroll) — an absolutely
1201+ // anchored pop inside it would grow that scroll area instead of
1202+ // overlaying the page. Centered also reads as the page's one dialog and
1203+ // is row-agnostic: the first row's pop and the last row's pop land the
1204+ // same, at any width.
1205+ position: fixed;
1206+ top: 50%;
1207+ left: 50%;
1208+ transform: translate(-50%, -50%);
1201 z-index: 30;1209 z-index: 30;
1202 width: 240px;1210 width: 240px;
1203 padding: 12px;1211 padding: 12px;
1204 background: var(--surface);1212 background: var(--surface);
1205 border: 1px solid var(--border-strong);1213 border: 1px solid var(--border-strong);
1206 border-radius: var(--radius);1214 border-radius: var(--radius);
1215+ box-shadow: var(--shadow-2);
1207 display: flex;1216 display: flex;
1208 flex-direction: column;1217 flex-direction: column;
1209 gap: 8px;1218 gap: 8px;