Skip to content

fix: side-nav scroll desync#50

Merged
KelvinTegelaar merged 1 commit into
CyberDrain:devfrom
k-grube:fix/side-nav-scroll-desync
Jul 24, 2026
Merged

fix: side-nav scroll desync#50
KelvinTegelaar merged 1 commit into
CyberDrain:devfrom
k-grube:fix/side-nav-scroll-desync

Conversation

@k-grube

@k-grube k-grube commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Clicking on the side-nav scroll bar after a scroll causes the scrollbar to jitter, click to play:
sidebar-scroll-jitter

this is caused by targetScrollTop only being writing from wheel events, not from keyboard moves, touch or dragging the scroll bar. moving the scroll bar after using the scroll wheel causes requestAnimationFrame to continuously move the scollbar back to the stale position set by the wheel event.

fixed by adding a new scroll listener that sync targetScrollTop from scroll events and cancels any in-progress animation. scroll events from the easing loop itself are skipped. the loop also stops when a write is clamped or rounds to a no-op.

@KelvinTegelaar
KelvinTegelaar merged commit bb1804f into CyberDrain:dev Jul 24, 2026
5 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.

2 participants