碳碳双键 on Discord #general (10-23, macOS app): on Usage → Requests a
wide table showed a strip of the page under its horizontal scrollbar,
between the bar and the bottom of the window.
Cause: the bar under the table (#ledHScroll, #799) is position: sticky,
bottom: 0 inside the view. A sticky box keeps clear of its scroller's
padding in both engines, so it stood the view's bottom padding (8px in
the window, 4px in the panel, 12px in a phone browser) above the view's
visible bottom, and the table's card and cells showed through the strip
under it. Measured on c4a5e6153 at 600x640: view bottom 612, bar bottom
604, the pixel row above the foot is a table cell, in Chromium and WebKit.
Fix: ledHScroll(), which already runs whenever the bar is shown or the
wrap resizes, sets the bar's bottom to minus its view's computed bottom
padding, so it sits on the view's foot. At the page's end the bar is in
flow under the table and does not move (sticky only shifts it while the
table runs past the foot). No CSS or other layout changes.
Test: ledger-hscroll-foot.test.cjs, Chromium with classic and with
overlay (default --hide-scrollbars) scrollbars and WebKit, zh and en, at
600 and 420 wide: mid-table the bar's bottom is the view's bottom (±0.5px)
and the view's last pixel row is the bar; at the page's end the bar sits
2px under the table. Red on c4a5e6153's page.js, 15 of 15 ("the bar's
bottom is the view's bottom, no gap under it: {"foot":612,"bar":604,...
"under":"where-name"}"), green with the change.
Run at c4a5e6153 + this change (rebased onto ed71fa774, which changes only
routing files; at the pushed head ledger-hscroll-foot, ledger-hscroll and
i18n-keys pass in both engines, 24 of 24):
- GUI, BROWSER=chromium and webkit, concurrency 4, 66 files (usage-*,
ledger-*, request-archive*, own-requests, i18n-keys, click-scroll,
old-webkit, gui-zh-tw, gui-ja, gui-de): chromium 477 pass / 16 fail,
webkit 472 pass / 16 fail. Every red is the same on c4a5e6153's
page.js (the four files run again with it: 36 pass / 16 fail in each
engine) and already filed: usage-agents-hide (#2276), usage-fold
"several accounts" in chromium (#2163), usage-ledger "newest live
route needs no return-to-live button" (#3104), usage-checkin Qoder tab
in WebKit (#3091, #2549). ledger-hscroll (#799) passes in both.
- go test -tags nogui -count=1 ./internal/gui/... under a temp HOME: ok.
Not tried: the real macOS app (the reporter's screenshot) and a real
overlay scrollbar in WKWebView; Playwright's WebKit and Chromium's
overlay mode stand in. No full `go test ./...` (JS-only change), no
Linux WebKitGTK or Windows WebView2 run.