-
Notifications
You must be signed in to change notification settings - Fork 405
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
Fix Touch Behavior Cancelled too fast if user just tap it once #2101
base: main
Are you sure you want to change the base?
Conversation
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.
Does your change handles double-tap? If so, how is the behavior?
Based on the referenced issue this fix doesn't solve that problem. I asked the author to open this anyway to show what they had and we work through it. I've added a review comment to show what I think might be the fix. I'll try and test it out later |
Yeah, I asked that, because (for me) would be odd to have the animation going on after I release the button, or if I double tap it, would that replicates two animations, if yes, that could cause some confusion on the user... |
@pictos here is the result when double tap. As you thought it is like handled by two animations. here is the attached result CleanShot.2024-08-12.at.10.51.39.mp4so you suggest to like giving throttle to ignore the next tap? or how it should be
@bijington I don't see your review or I miss something? Btw I change it to draft because I don't think it is ready yet |
e578c6a
to
3268083
Compare
@albilaga I believe the control should ignore any other touch while animation is performing. Since this is a single tap instead of a double-tap gesture. For me, at least, feels wrong having that behavior |
3268083
to
7dc958c
Compare
@pictos testing with native android with button pressed state it will just do pressed state again without ignoring the second tap? |
Hi @albilaga! Could you update this PR to resolve the merge conflicts? We've finally merged the massive .NET 9 PR today and it introduced a few merge conflicts across our open PRs. |
Hi @brminnick will do. this week hopefully can do resolve merge conflict. still got some fever 🤒🤒🤒 |
Added a conditional delay based on DefaultAnimationDuration in GestureManager to improve touch animation handling. Updated the sample TouchBehaviorPage to increase the DefaultAnimationDuration from 150ms to 500ms to show case the bug
7dc958c
to
358b51a
Compare
Hi @brminnick , PR already reabased |
Description of Change
When user tap the button or element that have
TouchBehavior
, theTouchBehavior
animation didn't respectDefaultAnimationDuration
to finish the animation. So basically after user tap it will directly cancel and it will throw stacktraceThis PR attempt to fix that by waiting with
Task.Delay
fromDefaultAnimationDuration
instead of just directly abort itLinked Issues
PR Checklist
approved
(bug) orChampioned
(feature/proposal)main
at time of PR