-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[widgets/scrollview]Attempt to fix nested scrollviews #6252
Conversation
The fix is great. I tested it and it worked in multiple situations without introducing new issues. Bug analysisThis kind of bug has been plaguing Given a parent and child who are both Then, upon a move, the parent checks Next, the system will start processing the Finally, now the child gets the Current fixThe implemented fix in the PR, replaces Ultimate causeFor me, the ultimate cause, is what I have mentioned previously elsewhere, is that we frequently use the following pattern everywhere, which I think should not be allowed, except if really needed: if touch.grab_current is not self:
return True IMO, we should never delay handling an event until Events should always be handled during the dispatching of the tree, and |
I discovered an issue with #5617. Running that example code and dragging the buttons will periodically cause a crash due to this PR. But, this PR did improve that issue, although it's not fully fixed (buttons are still sometimes pressed and vertical scrolling doesn't work). |
So I fixed the crash I mentioned by changing it to That's why we leak touches. Someone will have to rewrite this making sure all possible states are accounted for. Surprisingly, the example code in #5617 is an amazingly good test to find the issues in the scrollview. |
@matham And yes, I also think that the code have to be re-writtten. |
I think this could be an easy fix to get nested scrollviews scroll flawless.
I tested it on a real-world app.
Code to reproduce: