SIGN IN SIGN UP

table: Fix vertical wheel scroll leaking into outer scroll container (#2611)

https://github.com/user-attachments/assets/71d453a9-e75e-469d-8c14-0d608a060a8d

## Description

When a `DataTable` is nested inside a scrollable ancestor, wheel
scrolling over the table scrolled both the table and the ancestor at
once: the table body relies on gpui's `uniform_list` wheel listener,
which updates the offset but never stops propagation. The horizontal
axis was already protected by a `ScrollableMask` (#2608); the vertical
axis had no equivalent.

- Add a vertical `ScrollableMask` sibling to the table (skipped when the
table is empty, where the handle state is stale).
- `ScrollableMask` edge semantics now differ per axis, matching platform
scrollers (macOS responder-chain forwarding, CSS `overscroll-behavior:
auto`): a vertical mask consumes axis-dominant wheel events only while
the content can still move and hands them back to the ancestor at the
edge or when there is no overflow; a horizontal mask keeps consuming
even at the edge, since a bubbled horizontal delta would be axis-mapped
onto a vertical-only ancestor by gpui's wheel listener (#2468).
- The vertical comparison uses clamped offsets so transient unclamped
overscroll from gpui's own listener doesn't swallow events during a
fling at the edge.
- Behavior note: a vertical wheel over the table header now scrolls the
table body instead of the ancestor, matching browser behavior.
- Add a minimal repro example: `cargo run -p table_in_scrollable`.

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
F
Floyd Wang committed
ae30c2aa68230351b8bc0d5e08671c9359ee90b2
Parent: 57a9903
Committed by GitHub <noreply@github.com> on 7/29/2026, 3:55:34 AM