-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Determine the scroll gesture axis based on the effectiveScrollController #156190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Piinks
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for sending a fix!
| return gestures; | ||
| } | ||
|
|
||
| switch (_axis) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this bug was introduced by #146654, should we change _axis to a getter that returns _effectiveScrollController!.position.axis? Other uses of _axis in this code may have the same bug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure - I'm not an expert on this module. But from what I can tell, _axis was added for thumb press handlers that can not assume the availability of _effectiveScrollController.position.
Unlike the users of _axis, _gestures is checking _canHandleScrollGestures. That ensures that _effectiveScrollController.position is usable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks again for this!
Piinks
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Fixes #154520