fix mouse wheel scroll miscontrol of ScrollPosition.#66039
fix mouse wheel scroll miscontrol of ScrollPosition.#66039fluttergithubbot merged 40 commits intoflutter:masterfrom
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat. Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
|
It looks like @dkwingsmt may be more familiar with the failing pointer tests here. Regarding writing a test for this, this test checks the pointer scroll event, we can modify this test to use a NestedScrollView and validate the behavior: |
Can you clarify? I am wondering if what we may need here is to deploy some of the |
|
Do you mean to leave I think this may be difficult.
|
|
Ah ok. Do you think it is possible to separate this out into two pull requests? This appears to be trying to solve two different issues. |
|
I don't think so, as |
Is it possible you could add |
|
I don't think so, I don't think there's any other way, after adding |
|
I may not have described it clearly before, but now I'll explain why not.
So it can't be split into two PR. I hope I've made it clear to you this time. cc @Piinks |
|
I'm pretty sure the test failure is because of the design that relies on I'm not an expert in scrollables but I don't think it's a good design. I suppose |
|
Thanks for the review, but regarding the I may have a different opinion about But I agree that |
…miscontrol_of_ScrollPosition # Conflicts: # packages/flutter/lib/src/widgets/scrollable.dart
…y is now abandoned.
…/ ScrollDirection.reverse" test.
…rollDirection.forward / ScrollDirection.reverse test.
|
Now it' s been updated and improved for testing. |
…miscontrol_of_ScrollPosition # Conflicts: # packages/flutter/test/widgets/nested_scroll_view_test.dart
…miscontrol_of_ScrollPosition
…miscontrol_of_ScrollPosition
…miscontrol_of_ScrollPosition
|
Hey @YeungKC can you check your branch? It looks like there was an issue when you rebased. |
…miscontrol_of_ScrollPosition
…crollPosition' into Fix_Mouse_Scroll_miscontrol_of_ScrollPosition
…miscontrol_of_ScrollPosition
|
It seems like I had already noticed it at the time, but at the time I wasn't sure if I was the only one experiencing the problem. https://discord.com/channels/608014603317936148/613398423093116959/771433253529059438 It's updated now. I'm watching ci work. |
|
This pull request is not suitable for automatic merging in its current state.
|
…miscontrol_of_ScrollPosition
|
There were still some problems before, but now it can be merged. cc @Piinks |

Description
Trying to solve #55362 and #64266.
The handling of
PointerSignalEventinScrollableis directly derived from the currentScrollPosition.pixels+ delta, whileNestedScrollViewcontains multipleScrollPositions, andNestedScrollViewcontains multipleScrollPosition. It doesn't make sense to calculate the target value alone.So I've changed it to pass the delta directly to
ScrollPositionand letScrollPositionhandle it internally.About #64266, The original
PointerSignalEventwas handled by callScrollPosition.jumpTowhich did not updateScrollDirection.forwardorScrollDirection.reverse, now it is handled by callScrollPosition.jumpTowhich does not updateScrollDirection.forwardorScrollDirection.reverse. callbeginActivity, now it will updateScrollDirection.forwardnormally.Related Discord: https://discordapp.com/channels/608014603317936148/608018585025118217/755515518294687844
Related Issues
Fixes #55362
#64266
Replace this paragraph with a list of issues related to this PR from our issue database. Indicate, which of these issues are resolved or fixed by this PR. There should be at least one issue listed here.
Tests
I added the following tests:
Checklist
Before you create this PR, confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Did any tests fail when you ran them? Please read Handling breaking changes.