From cd8f1337c20a6d2a211e3af3f80753c8fe6b8c9f Mon Sep 17 00:00:00 2001 From: hectorqin Date: Mon, 26 Oct 2026 10:00:19 +0800 Subject: [PATCH] fix(web): keep mobile sheets scrollable --- web/src/styles/sheet.css | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/web/src/styles/sheet.css b/web/src/styles/sheet.css index 97a06b0..60abb5d 100644 --- a/web/src/styles/sheet.css +++ b/web/src/styles/sheet.css @@ -15,6 +15,7 @@ max-width: 100%; height: auto; max-height: calc(100dvh - var(--safe-top) - 1.5rem); + min-height: 0; margin: 0; padding: 0; border: 1px solid var(--reader-line); @@ -85,7 +86,11 @@ .sheet-body { flex: 1 1 auto; + /* Let the body give up intrinsic content height so long lists scroll inside + the capped sheet instead of overflowing past the viewport. */ + flex-basis: 0; min-height: 0; + max-height: 100%; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; @@ -257,6 +262,14 @@ } @media (max-width: 700px) { + /* Give regular sheets a definite flex height. Without one, some mobile + WebViews keep the native dialog at its intrinsic content height and the + body's overflow area never becomes a scroll container. Compact prompts + remain content-sized. */ + .sheet:not([data-size='compact']) { + height: min(80dvh, calc(100dvh - var(--safe-top) - 1.5rem)); + } + .sheet-footer .button { flex: 1 1 0; }