Skip to content

Ignore transient opposite scroll pulses before reversing#908

Open
seng1e wants to merge 1 commit intoCaldis:masterfrom
seng1e:fix/scroll-reversal-spikes
Open

Ignore transient opposite scroll pulses before reversing#908
seng1e wants to merge 1 commit intoCaldis:masterfrom
seng1e:fix/scroll-reversal-spikes

Conversation

@seng1e
Copy link
Copy Markdown
Contributor

@seng1e seng1e commented Apr 2, 2026

Summary

Improve scroll smoothing stability by requiring confirmation before treating a brief opposite-direction pulse as a real reversal.

Related issue

  • likely addresses scroll bounce back #568 (scroll bounce back), where users report one-direction scrolling occasionally reversing or bouncing back

What changed

  • add per-axis reversal candidate tracking in ScrollPoster
  • ignore the first opposite pulse while residual scroll is still active
  • accept reversal on the next matching opposite pulse and reset the smoothing filter
  • add focused tests for continuation, ignored opposite pulse, confirmed reversal, and immediate reversal without residual momentum

Root cause

Mos previously reset scroll direction immediately when any opposite-direction input arrived. On some mice, a transient opposite pulse can appear during fast wheel motion. That single pulse was enough to reset the scroll buffer and produce a visible reverse spike.

Validation

  • built patched release Mos.app locally with Xcode 26.4
  • installed the patched app over the local Mos.app and verified it launches
  • manual testing on the target machine no longer reproduces the random reverse-scroll spike

Notes

This keeps intentional direction changes working, but adds a small confirmation guard while residual smooth-scroll output is still active.

@seng1e seng1e marked this pull request as ready for review April 2, 2026 10:25
Copy link
Copy Markdown
Contributor Author

seng1e commented Apr 2, 2026

Related issue: #568 (scroll bounce back). The symptoms described there match this fix very closely: during one-direction wheel scrolling, the output can briefly reverse or "bounce back". That issue also has multiple confirmations across different macOS versions and mice, which lines up with the transient opposite-pulse behavior addressed by this PR.

@seng1e seng1e mentioned this pull request Apr 2, 2026
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