scroll: Fix markdown table horizontal scroll leaking into vertical body scroll (#2608)
## Description With a trackpad, horizontal swipes over a horizontally scrollable markdown table (`TextViewStyle.table` with `overflow_x: scroll`) scrolled the whole markdown body vertically instead, making the table nearly impossible to scroll. Two causes: 1. With `scrollable(true)` the body is a `gpui::list`, which registers its wheel listener after its items paint, so in the bubble phase (reverse registration order) it consumed `delta.y` before `ScrollableMask` could stop the propagation. The mask now consumes axis-dominant wheel events in the capture phase; vertical-dominant events keep bubbling to the body (preserves #2468). 2. The mask was a child of the scrolled element and slid away from the viewport as the table scrolled, leaving the uncovered part leaking to the parent scroller. It is now a sibling of the scrolled element, same as `Table`. The mask also checks `HitboxId::should_handle_scroll` now, staying inert when occluded (dialogs, context menus). Since capture runs in registration order, nested masks resolve innermost-first. Added 4 tests reproducing the `gpui::list` structure. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
F
Floyd Wang committed
accb9616263be16746b49a1d23eb54ec810deabd
Parent: f078910
Committed by GitHub <noreply@github.com>
on 7/28/2026, 8:46:48 AM