-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
PanGesture notify Completed event moving outside View limits #15700
Conversation
src/Controls/src/Core/Platform/GestureManager/GesturePlatformManager.Windows.cs
Outdated
Show resolved
Hide resolved
This PR include changes associated with the PanGestureRecognizer firing the Complete status if we move outside the View with the gesture limits. Feedback? |
Is this expected? I think panning should work when the pointer goes out of the view, and only complete where the cursor is lifted. What happens if you hold the button down and drag out and while still holding, return to the view. I feel it should continue the pan? |
This is not how it worked in Forms. And as far as I can tell, this is not how it works on any native applications. The pan gesture is "completed" when the touch is lifted, not when the touch goes outside the bounds of the view. |
Thanks for the feedback. I've aligned behaviors across all platforms. In all cases pan gesture is "completed" when the touch is lifted (inside or outside the View where the gesture began). |
Seems we removed the test ? |
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.
Tested on Windows and Android. Was able to see the Completed event trigger when I let go inside and outside the original view. I am curious how to trigger the Canceled event though
* Fix the issue * Added sample * Fix the issue on Android * Updated Impl * Implement the changes also on iOS/Catalyst * Revert changes on Android and iOS * More changes * Remove unnecessary changes * Align Windows behavior with the test of the platforms * Removed unnecessary changes * Added UITest * Removed test * Added UITest
Description of Change
The PanGesture reports a completed event status when the touch is lifted.
To test the changes, use the added sample in the .NET MAUI Gallery. You can find it in Core > Gestures > PanGesture Gallery.
Issues Fixed
Fixes #5191