Repository navigation
fix(ui): lock the app root scroll in every host, not just standalone PWAs - #107102
Merged
Merged
Conversation
Contributor
Author
|
Land-ready proof for head 51b84e3:
Known gap: not exercised inside an actual WKWebView app build; behavior verified in Chromium with the injected native classes/CSS from |
Contributor
Author
|
Merged via squash.
|
github-actions Bot
pushed a commit
to Desicool/openclaw
that referenced
this pull request
Jul 14, 2026
…PWAs (openclaw#107102) * fix(ui): lock the app root scroll in every host, not just standalone PWAs * fix(ui): size mount fallback scroller to the visible viewport
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What Problem This Solves
In the macOS app (Settings takeover, e.g. Settings → About), scrolling the content pane could drag the whole page up — settings sidebar, titlebar clearance, everything — leaving the sidebar header stranded under the traffic lights. The page-level scroll should never move; only the settings content pane or the sidebar nav list should scroll.
Why This Change Was Made
ui/src/styles/base.cssalready documents the contract — "inner panes scroll, the root never should" — but the actual root scroll lock (overflow: hiddenonhtml/body/openclaw-app) was gated behind@media (display-mode: standalone). The macOS app's WKWebView is native web chrome (html.openclaw-native-web-chrome), not PWA-standalone, so the document stayed scrollable and WKWebView happily scrolled/rubber-banded the whole shell.Fix: hoist the root lock out of the standalone gate so it applies in every host (browser tab, PWA, Mac app WKWebView):
html, body { overflow: clip }—clipinstead ofhiddenbecausehiddenroots can still be displaced programmatically (focus/scrollIntoView), which would strand the shell off-screen with no way to scroll back;clipforbids all root scrolling.openclaw-appbecomesheight: 100%(wasmin-height: 100vh), matching what the standalone block already did..mount-fallbackerror surface inui/index.htmlgets its own scroller since the body no longer scrolls for it.All top-level surfaces already own their scrolling (
.shellis100dvh/overflow: hiddenwith.contentand.settings-sidebar__navas scrollers; login gate and approval page are self-contained100dvhboxes withoverflow-y: auto), so nothing legitimately relied on document scroll. The two window-level scroll listeners (github-link-hovercard,chat-selection-popup) use capture and keep hearing inner-scroller events.User Impact
macOS app users can no longer scroll the whole Settings page (or any page) as one unit; the settings sidebar stays pinned while the content pane and sidebar nav scroll independently. Same guarantee now holds for browser tabs and PWA installs.
Evidence
pnpm dev:ui:mock) with the Mac app's native web chrome injection simulated (classes + 52px titlebar CSS fromDashboardWindowController.installNativeChromeScript), on/settings/about:htmlcomputedoverflow-y: visible).html/bodycomputeoverflow-y: clip;window.scrollTo(0, 999)+scrollIntoViewleavewindow.scrollY,documentElement.scrollTop,body.scrollTopall0, while.content(scrollTop229/229 max) and.settings-sidebar__nav(200/274) scroll independently with the sidebar header pinned.ui/src/e2e/native-nav-sidebar-toggle.e2e.test.ts: forces document overflow in the Settings takeover under web chrome and asserts the root refuses to scroll (fails before this fix, passes after).pnpm check:changed+ focused e2e run on Blacksmith Testbox (IDs in comments below).