From baf3850388ed2dd93307fe775dbb5511284ba69a Mon Sep 17 00:00:00 2001 From: Denis Andreyev Date: Mon, 9 Nov 2026 13:15:45 +0500 Subject: [PATCH] Clip only #root so the app shell cannot scroll the viewport --- apps/web/src/index.css | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/web/src/index.css b/apps/web/src/index.css index 173ba2c..23ab79a 100644 --- a/apps/web/src/index.css +++ b/apps/web/src/index.css @@ -140,13 +140,15 @@ /* * The app shell is exactly the viewport and every pane scrolls inside itself. scrollIntoView() (transcript jumps, * criterion focus) also scrolls ancestors, and overflow:hidden still allows that, which shifted the whole app up and - * left an empty band below it. clip forbids any scrolling of these wrappers. Screen only: print flows normally. + * left an empty band below it. clip forbids any scrolling of #root. Only #root: overflow on html/body propagates to the + * viewport, where clip is treated as hidden and the viewport stays programmatically scrollable (the blank band came + * back). With html/body left alone the document is exactly viewport-high, so there is nothing to scroll. Screen only. */ @media screen { - html, - body, #root { overflow: clip; + /* Containing block for every absolute descendant; otherwise they escape the clip and make the page scrollable. */ + position: relative; } } body {