Skip to content

Pause timeline playhead following once the user pans or zooms - #74

Merged
wassgha merged 1 commit into
mainfrom
fix/timeline-follow-scroll
Aug 6, 2026
Merged

Pause timeline playhead following once the user pans or zooms#74
wassgha merged 1 commit into
mainfrom
fix/timeline-follow-scroll

Conversation

@wassgha

@wassgha wassgha commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Same conflict #71 fixed in the transcript, in the timeline.

Problem

Playhead following owned scrollLeft unconditionally while playing: pan the track or wheel-zoom into a detail and the next frame yanked the window back to the playhead.

Fix

The existing "keep the playhead visible while playing" effect is unchanged in behaviour — it just stops running once the user takes over. A scroll position the effect did not write itself is the user's, so following pauses until the next play/pause.

Attribution is by comparing the scroll event's scrollLeft against the last value the effect wrote, which covers trackpad panning, the scrollbar, keyboard, and the anchor-preserving scroll that wheel-zoom applies.

17 added lines, no new UI.

Testing

tsc --noEmit and eslint are clean. Not exercised by hand in the app — the interaction wants a real media file and playback to judge.

@vercel

vercel Bot commented Aug 6, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app.rescript Ready Ready Preview Aug 6, 2026 4:34am

Following owned scrollLeft outright, so a pan or wheel-zoom during playback was
undone on the next frame. Any scroll position the follow effect did not write
is the user's; leave the window alone until the next play/pause.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@wassgha
wassgha force-pushed the fix/timeline-follow-scroll branch from 82bb25d to 07fa970 Compare August 6, 2026 04:33
@wassgha wassgha changed the title Stop the timeline from fighting the user's pan and zoom Pause timeline playhead following once the user pans or zooms Aug 6, 2026
@wassgha
wassgha merged commit 0ee4815 into main Aug 6, 2026
3 checks passed
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