Repository navigation
feat: Autoscroll with the middle mouse button on desktop - #1169
Merged
PartyDonut merged 3 commits intoOct 18, 2026
Merged
Conversation
Holding the middle button marks an origin and scrolls the nearest horizontal and vertical scrollable under the pointer towards wherever the pointer is relative to it, faster the further away, until the button is released. A small marker shows the origin and a dead zone around it stops small hand movements from drifting the view. Hooked in through the app ScrollBehavior so it covers every scroll view. Primary button drag, taps and the mouse drag setting are unaffected. Disabled on web, where the browser has its own autoscroll.
MrRussLuther
added a commit
to MrRussLuther/Fladder
that referenced
this pull request
Oct 13, 2026
PartyDonut
approved these changes
Oct 18, 2026
PartyDonut
left a comment
Collaborator
There was a problem hiding this comment.
LGTM. Good improvement.
I removed the test as we probably don't need it for this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Description
Browser-style autoscroll for the middle mouse button on desktop, as described in #1156. Hold the middle button and a small marker appears where you pressed. Move the mouse away from it and the view scrolls that way, faster the further you move. Let go and it stops. It works on both axes at once, so on the series page the episode row scrolls sideways while the page scrolls down in one motion.
How it fits together:
FladderScrollBehaviorreplaces the stockMaterialScrollBehaviorinmain.dartand wraps every scrollable in aMiddleMouseAutoscrolllistener, so nothing changes in individual widgets. On web it returns the stock scrollbar untouched, since the browser already does this.Tickerand the markerOverlayEntry. Each tick scrolls every claimed axis byspeed * dtthroughScrollPosition.pointerScroll, so the existing physics clamp it at the extents. Speed is 6 px/s per pixel the pointer sits past an 8 px dead zone, capped at 3000 px/s. Reversed axes (RTL rows) are handled, so the content always moves towards the pointer.It takes over no gestures: left click, taps and "Drag using mouse" behave as before. There is no click-to-toggle mode like browsers have, only hold. If you'd rather have this behind a setting next to "Drag using mouse", I'm happy to add that.
test/middle_mouse_autoscroll_test.dartcovers scrolling towards the pointer on both axes, stopping on release, speed growing with distance, the dead zone, the stray click, holding outside the row, clamping, RTL rows, and the primary button being left alone.Issue Being Fixed
Discussion #1156. With a mouse, long horizontal rows mean the arrow buttons or shift+scroll one direction at a time, and long grids mean a lot of wheel spinning.
Screenshots / Recordings
Holding the middle button over a row on the dashboard and moving the mouse to the right. The row scrolls sideways, the marker sits where the button was pressed, and it stops on release. Moving diagonally scrolls the page at the same time.
Tested On
Checklist