From 009be05d22cf7ffc823f8ba8572c0118d29bdc6c Mon Sep 17 00:00:00 2001 From: Maurice Date: Thu, 12 Nov 2026 08:42:16 +0100 Subject: [PATCH] fix(mobile): a sheet no longer shows the page through it while it opens The dim faded in on the sheet's own parent, and opacity multiplies down the tree, so for its first frames even the opaque sheet let the list behind read through as ghost text (Android tester, expense editor). The dim now fades on a layer of its own beside the sheet, and the card is opaque halfway through its pop. --- client/src/mobile/components/MSheet.tsx | 10 ++++++++- client/src/mobile/mobile.css | 4 +++- client/tests/unit/mobile/MSheet.test.tsx | 26 +++++++++++++++++++++++- 3 files changed, 37 insertions(+), 3 deletions(-) diff --git a/client/src/mobile/components/MSheet.tsx b/client/src/mobile/components/MSheet.tsx index 53714ebfa..9be381238 100644 --- a/client/src/mobile/components/MSheet.tsx +++ b/client/src/mobile/components/MSheet.tsx @@ -154,6 +154,9 @@ const SHORT_FORM_SHAPE = 'm-form-sheet short:flex-1 short:border-b-0 short:[--m- // behind read through as sharp ghost text: the frosting it counted on is // dropped whenever an ancestor animates its opacity (the scrim fading in), // which WebKit and Chromium both do, so the fields floated over the list behind. +// For the same reason the dim fades on a layer of its own, beside the sheet and +// not around it: opacity multiplies down the tree, so a fading parent made even +// the opaque sheet see-through for its first frames. const SURFACE = 'bg-[color:var(--m-sheetop)] border border-[color:var(--m-shbr)]' // The docked sheet rises from below the screen edge like a native sheet; the @@ -283,12 +286,17 @@ export default function MSheet({ // has to fall back to document.body (sheet mounted in the same commit as // the shell).
{ if (e.target === e.currentTarget) requestClose() }} > +