-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Don't disable pointer interaction during trackpad scroll #106890
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
Don't disable pointer interaction during trackpad scroll #106890
Conversation
f4b062d to
64ee8bd
Compare
| expect(find.text('Page 9'), findsOneWidget); | ||
| }); | ||
|
|
||
| testWidgets('Scroll device type controls whether pointer is ignored.', (WidgetTester tester) async { |
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.
| testWidgets('Scroll device type controls whether pointer is ignored.', (WidgetTester tester) async { | |
| testWidgets('Pointer is not ignored during trackpad scrolling.', (WidgetTester tester) async { |
77de568 to
486756b
Compare
486756b to
f7ff2fa
Compare
|
A test is failing because |
Was being lazy with testing the trackpad processing. I added some proper event synthesis functions and used those instead. |
|
Fly-by comment from triage: looks like the analyzer is unhappy. |
2c128a0 to
1c8623e
Compare
dkwingsmt
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
|
cc @Piinks |
| super.delegate, | ||
| Simulation simulation, | ||
| TickerProvider vsync, | ||
| this.shouldIgnorePointer, |
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.
This might be a breaking change, let me run some internal tests first. One way to work around this is to make it an optional parameter with a default behavior.
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.
Actually I was able to do a quick look up and found no uses of this class internally. ✅
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.
I did find a breakage in an external package while testing this with my existing code, but they were only overriding BallisticScrollActivity to perform the exact same function as here.
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.
What happens if the user tries to drag again before the activity finishes? Will it crash? I see the test checks for tapping, but what if the user tries to drag scroll? I think the scroll view might throw because it can only have one active drag at a time..
|
|
Just double checking common crashes when we make changes like these. 😉
|
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
Usually pointer interaction is disabled during a drag scroll. Now that trackpad uses a continuous/drag scroll, this should be changed so that mouse hover effects and clicking is possible as it was before recent changes.
Fixes #105308
Pre-launch Checklist
///).