Commit Graph
2 Commits
Author SHA1 Message Date
yetone 0f6defe78b gui: on a Mac a region or agent strip scrolls with no bar, so a click right after a scroll picks the option under it (#1620)
tencent-cloud.test.cjs was red in WebKit now and then: a region clicked
was not picked. The cause, found by scrolling the strip from the test and
clicking 30ms later: on a Mac page (body.mac) WebKit shows its overlay
scrollbar over the lower half of a scrolled strip for a moment, and
elementsFromPoint at an option's centre returned the strip, not the
option. A press there goes to the bar's track, which pages the strip
sideways (smoothly, 198 -> 44) and picks nothing. A reader on a Mac who
scrolls the regions and clicks at once meets the same miss.

On a Mac these strips (.segs.regions, Connect's segs, #sessAgent) now
scroll with no bar, as a Mac's own tab strips do (scrollbar-width: none,
::-webkit-scrollbar display none). Other systems keep their thin bar.
z-index, isolation and position on the options didn't help; only hiding
the bar did.

Tests:
- tencent-cloud.test.cjs: new "a region clicked right after the strip
  scrolled is the one picked", 480x1200 (the strip in the window; it
  checks so), 10 rounds over 5 scroll positions. Without the CSS WebKit
  missed 39 of 50 clicks (40 of 50 on origin/main 5dfcf4346); with it 0.
- strip-scrollbar.test.cjs now says the Mac strip has no bar (width none,
  bar 0), and goes red without the CSS.

Run: tencent-cloud 20/20 green in WebKit and 20/20 in Chromium;
strip-scrollbar, sess-agent-strip, usage-sessions-agents-fit,
tencent-access-key, system-one, click-scroll, segs-press-redraw in both
engines (segs-press-redraw's Chromium 440px case is red now and then
under load in other trees too: it is one of the Settings tests #1659 is
moving onto the page's last settings read; green 8/8 in each engine
with this change).
2026-10-12 01:55:05 +08:00
yetone f232a5df45 sessions: the agent tabs scroll under the app's thin thumb on Windows, not its classic scrollbar (ARNO on Discord: 会话面板是不是被改坏了…现在变得好丑) — the strip, and a provider's region picker that shares its class, set scrollbar-width: thin, and in Chromium (WebView2) that drops every ::-webkit-scrollbar rule, so Windows drew its own bar, arrows and all, under the tabs. The strip now leaves scrollbar-width alone and takes the app's thumb, 6px high; on a Mac the overlay bar is as it was. strip-scrollbar fails without the change; click-scroll, old-webkit, sessions-manage pass. 2026-10-02 00:31:16 +08:00