Skip to content

fix(tabs): follow-ups from the wheel-scroll review (#2095) #2103

Closed

Description

@devswha

Follow-up to #2095 (non-blocking findings from the merge pass's review).

  • Diagonal trackpad input can move the strip the wrong way (src/components/TabStrip.tsx, wheel handler): a vertical-dominant event that also carries horizontal motion is cancelled and translated from deltaY alone. At scrollLeft=400, deltaX=-20, deltaY=40 moves the strip to 440, opposite to the swipe's horizontal part. Reproduced by Codex in a component unit fixture. Suggested: leave events with deltaX !== 0 to the browser, and cover vertical-dominant diagonals with matching and opposing signs.
  • Fragile rebinding: the wheel listener is reattached only when [shown, tabsHidden, end === undefined] changes; a callback ref would survive a future wrapper element.
  • Firefox line-mode branch runs less often than the comment says (deltaY is read before deltaMode).
  • Wheel at the strip's end is still cancelled, so a future scrolling parent would not get it.
  • Open tab menu or drag insertion line can drift while the strip scrolls (also true for trackpad/touch scrolling before fix(tabs): scroll an overflowing tab strip sideways with a vertical mouse wheel #2095).
  • One waitForFunction in scripts/tab-overflow-regression.ts relies on Playwright's 30 s default timeout.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions