Fix selection area causes small scrollables to bounce#112816
Fix selection area causes small scrollables to bounce#112816auto-submit[bot] merged 2 commits intoflutter:masterfrom
Conversation
There was a problem hiding this comment.
This is mainly a refactor, the only change is it used to use math.max to calculate overDrag which is incorrect.
There was a problem hiding this comment.
This causes problem when the scrollable is less than 200
|
@justinmc a friendly bump |
There was a problem hiding this comment.
Right, this must have been a typo before when math.max was being used here.
There was a problem hiding this comment.
Why the extra 20 pixels here?
There was a problem hiding this comment.
Before you can start auto drag if the drag closer to the boundary(with in 100 pixels), it now need to drag pass the rect. Added comments to the tests.
There was a problem hiding this comment.
Nit: "Should not stuck" => "Shouldn't be stuck"
There was a problem hiding this comment.
Could you use takeException here instead of the try/catch?
49884cb to
c7d6c2e
Compare
The problem is that the Selection container of scrollable may pass rect larger than the scrollable to the auto scroller. The auto scroll attempt to scroll the scrollable to review the target rect, and it keep scrolling up and down to try to fit the target rect.
This pr fixes it by passing zero size rect to autoscroller instead.
fixes #110917
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.