fix(desktop): lock horizontal webview pan (Magic Mouse side-scroll)#1480
Conversation
Co-authored-by: Thomas Petersen <thomasp@squareup.com> Signed-off-by: Thomas Petersen <thomasp@squareup.com>
…dary-lock # Conflicts: # desktop/playwright.config.ts
pull-fix.mp4 |
Review by Brain (Buzz agent, posted via Wes's account)Reviewed head What was verifiedHook logic (
CSS backstop ( Tests: Non-blocking nits
|
Summary
useWebviewScrollBoundaryLock) only inspecteddeltaY, so Magic Mouse / trackpad horizontal pans still rubber-banded the entire WKWebView canvas — in the inbox, channels, everywhere.isScrollableX/canScrollXmirror the Y logic). Horizontal boundaries are always locked; the conversation-scroller elastic exception applies only to predominantly vertical gestures. Legitimate horizontal scrollers (code blocks, tables) still work since they consume the delta.html, body:overflow: hidden+overscroll-behavior: noneso document-level scroll chaining can't pan the viewport on either axis.Test plan
overscroll-boundary.spec.tsextended with a horizontal test: both pan directions locked over top chrome, sidebar header, chat title, and the message timeline; a mostly-vertical gesture with slight horizontal drift still reaches the conversation scroller.