-
Notifications
You must be signed in to change notification settings - Fork 401
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
Ensure TouchBehavior.LongPressCompleted
event fires when LongPressCommand is null
#2239
Merged
brminnick
merged 8 commits into
main
from
Ensure-LongPressCompleted-Fires-When-LongPressCommand-is-null
Oct 4, 2024
Merged
Ensure TouchBehavior.LongPressCompleted
event fires when LongPressCommand is null
#2239
brminnick
merged 8 commits into
main
from
Ensure-LongPressCompleted-Fires-When-LongPressCommand-is-null
Oct 4, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brminnick
changed the title
Ensure TouchBehavior.LongPressCompleted event fires when
Ensure Sep 30, 2024
LongPressCommand is null
TouchBehavior.LongPressCompleted
event fires when LongPressCommand is null
…ssCommand-is-null
bijington
approved these changes
Oct 4, 2024
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.
It took me a while to work out what exactly CanExecute
meant but once I understood that then the changes look good. Thanks @brminnick
…ssCommand-is-null
Ha! I know exactly what you mean. I spent a lot of time trying to figure that out too when working on this PR. Thanks man!! |
brminnick
deleted the
Ensure-LongPressCompleted-Fires-When-LongPressCommand-is-null
branch
October 4, 2024 06:10
KeithBoynton
added a commit
to KeithBoynton/CommunityToolkitMaui
that referenced
this pull request
Oct 31, 2024
* main: Update dependabot.yml Tell Dependabot to ignore required libraries from auto-updating [housekeeping] Automated PR to fix formatting errors (CommunityToolkit#2295) [housekeeping] Automated PR to fix formatting errors (CommunityToolkit#2292) Fix animation behavior hot reload (CommunityToolkit#2288) Update resourceManagement.yml [housekeeping] Automated PR to fix formatting errors (CommunityToolkit#2285) [Housekeeping] Update NuGet Packages (CommunityToolkit#2254) Implement the ability to Close a popup (CommunityToolkit#1688) Add `[Obsolete]` tag Fix FileSaver Progress (CommunityToolkit#2277) Ensure `TouchBehavior.LongPressCompleted` event fires when `LongPressCommand is null` (CommunityToolkit#2239) Add Popup Support for MediaElement on iOS + MacCatalyst (CommunityToolkit#2251) [Sample app] Add MediaElementMultipleWindowsPage (CommunityToolkit#2250) [Sample App] Add Second CarouselView to `MediaElementCarouselViewPage.xaml` (CommunityToolkit#2248) Fix Windows Autoplay bug (CommunityToolkit#2238) Fix Crash on iOS when using MediaElement inside a CarouselView (again) (CommunityToolkit#2245) Refactor URLs and improve logging consistency (CommunityToolkit#2228) Bump xunit from 2.9.1 to 2.9.2 in /samples (CommunityToolkit#2234) Increase `CommunityToolkitSampleApp_Xcode_Version` to `16`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change
This PR normalizes the behavior between
TouchBehavior.TouchGestureCompleted
andTouchBehavior.LongPressCompleted
.Currently, the
TouchBehavior.TouchGestureCompleted
event fires regardless of whether itsCommand
is set, usingTouchBehavior.IsEnabled
to determine whether or not to proceed with handling the touch:Maui/src/CommunityToolkit.Maui/Behaviors/PlatformBehaviors/Touch/GestureManager.shared.cs
Line 62 in 0b8f8ef
This PR updates GestureManager.HandleLongPress use similar logic, verifying
TouchBehavior.IsEnabled
to determine whether or not to proceed with handling the long press.Linked Issues
PR Checklist
approved
(bug) orChampioned
(feature/proposal)main
at time of PRAdditional information
I've also added Unit Tests for
GestureManager
to cover the bug fixed in this PR