fix(frontend): a dialog's rows keep their own height on an iPhone (#1110) #1111
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/phone-reveal-dialog"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Refs #1110 (item 2, the owner's screenshot of "Show … to the table" on an iPhone running Orion).
Cause
No rule of ours gives the dialog a height. WebKit up to Safari 18 lays out a modal
<dialog>that is a grid against the tallest it may be (the UAmax-height) before it resolves the UAheight: fit-content. With.modal[open] { display: grid }and the defaultalign-content: normal, the auto rows share that height out, andfit-contentthen keeps the stretched result. Nested grids and the flex row of buttons stretch inside their rows: gaps under every line, a tall fieldset, buttons twice their height.Reproduced in WebKit 17.0, 17.4 and 18.4 (Playwright 1.38, 1.45, 1.52): dialog 704 px of a 740 px viewport, buttons 88 to 92 px. Not reproducible in WebKit 26.6 (the pinned Playwright 1.63) or Chromium, which is why two earlier attempts saw nothing.
Fix
align-content: starton.modal[open]. Where a dialog is already as tall as its content this changes nothing: Chromium and WebKit 26.6 measure identically before and after. In WebKit 18.4 the dialog goes from 704 to 512.5 px and its buttons from 92 to 44 px.Tests
j4-run-the-table.spec.js:rowsKeepTheirHeightgives the open dialog 160 px of spare height and asserts no row or button grew. It fails on the unfixed build (buttons 44 to 84) and passes on the fixed one in all three projects (21 passed, 3 existing skips).Modal.test.jsx: reads the rule fromModal.css.vitest run src/ui/Modal(8 passed), the J4 journey. Not run locally: the full vitest suite and the other journeys; CI runs them.What CI cannot see
Every CI project is Chromium, so CI guards the rule, not the WebKit behaviour. A webkit project at the pinned version would not have caught this either (26.6 is unaffected). Not checked: the
stickyFootdialogs and the/designstills in old WebKit; the owner's Orion itself.🤖 Generated with Claude Code