Skip to content

fix(app): stop following the timeline end while dragging the scrollbar - #57831

Merged
jlongster merged 1 commit into
devfrom
thumb-drag-unpin
Oct 21, 2026
Merged

jlongster merged 1 commit into
devfrom
thumb-drag-unpin

Conversation

@jlongster

Copy link
Copy Markdown
Contributor

Issue for this PR

No issue filed yet.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Dragging the scrollbar thumb in a long session didn't scroll it: the timeline kept snapping back to the bottom.

The timeline only stops following the end when it sees a pointerdown (or a wheel/key event). The thumb is a sibling of the viewport where that handler lives, and its own pointerdown handler calls stopPropagation, so a thumb drag never registered as a user scroll. The timeline stayed pinned, and every time newly mounted rows replaced their size estimates it re-anchored to the end, so the next mouse move jumped up and the timeline snapped down again.

The handler now listens on the ScrollView root in the capture phase. That runs before the thumb stops propagation and still covers everything inside the viewport, so drag-selection past the edge behaves as before.

How did you verify your code works?

A Playwright script drags the thumb from the bottom to the top of a 320-turn mocked session in 60 steps and records scrollTop every frame:

  • before: snapped back to the end 57 times, and the drag ended at the bottom
  • after: no snap-backs, and the drag reaches the top

The content still shifts a little during the drag while rows measure (the virtualizer's size estimates); this PR doesn't change that.

Screenshots / recordings

Before: dragging the thumb leaves the view stuck at the bottom while the scrollbar jumps. After: the drag scrolls through the history.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant