Skip to content

Commit 07d27ea

Browse files
authored
Fix composite table not scrolling when dragging the synced bar (#842)
#841 only re-enabled finger scroll on touch; on desktop the wrapper was still overflow-x:hidden and scrolled via wrap.scrollLeft set from the synced bar. Programmatic scrollLeft on an overflow:hidden box is browser-flaky - some browsers move the bar but never scroll the clipped content (user-reported). Make the wrapper a real scroll container (overflow-x:auto) so the synced bar, wheel, trackpad and finger all scroll it reliably; hide its own horizontal scrollbar (webkit height:0; thin elsewhere) so only the synced bar shows, keeping the vertical scrollbar.
1 parent 0b71eb6 commit 07d27ea

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

site/static/new-leaderboard/index.html

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,9 +285,12 @@
285285

286286

287287
/* ── Composite matrix ────────────────────────────────────── */
288-
.cwrap{display:block; width:100%; overflow-x:hidden; overflow-y:auto; max-height:calc(100vh - 210px); border:1px solid var(--line); border-radius:10px; margin-top:.15rem}
289-
/* touch devices: allow finger-slide horizontal scrolling of the table (desktop keeps overflow-x hidden + the synced bars) */
290-
@media (hover: none) and (pointer: coarse){ .cwrap{overflow-x:auto; -webkit-overflow-scrolling:touch} }
288+
/* table scrolls natively in both axes (bar drag, wheel, trackpad and finger all work); its own horizontal bar is hidden so only the synced bar shows */
289+
.cwrap{display:block; width:100%; overflow-x:auto; overflow-y:auto; max-height:calc(100vh - 210px); border:1px solid var(--line); border-radius:10px; margin-top:.15rem; -webkit-overflow-scrolling:touch; scrollbar-width:thin; scrollbar-color:var(--line) transparent}
290+
.cwrap::-webkit-scrollbar{width:10px; height:0}
291+
.cwrap::-webkit-scrollbar-thumb{background:var(--line); border-radius:6px}
292+
.cwrap::-webkit-scrollbar-thumb:hover{background:var(--muted)}
293+
.cwrap::-webkit-scrollbar-track{background:transparent}
291294
/* synced horizontal scrollbar + jump-to-end button above the table */
292295
.cscroll-row{display:flex; align-items:stretch; gap:.4rem; margin-top:.5rem}
293296
.cscroll-row.endonly{justify-content:flex-end; margin-top:.1rem; margin-bottom:.35rem}

0 commit comments

Comments
 (0)