Skip to content
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

[BUG] LongPressCompleted event won't fire unless LongPressCommand is bound #2164

Open
2 tasks done
velocitysystems opened this issue Aug 30, 2024 · 3 comments
Open
2 tasks done
Labels
bug Something isn't working unverified

Comments

@velocitysystems
Copy link

velocitysystems commented Aug 30, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Did you read the "Reporting a bug" section on Contributing file?

Current Behavior

When using the TouchBehavior the LongPressCompleted event will not fire unless the LongPressCommand is bound.
Note: This does not affect the TouchGestureCompleted event which fires regardless of whether its command is bound.

Expected Behavior

The LongPressCompleted event should fire on a long-press regardless of whether its command is bound.

Steps To Reproduce

  1. Create a new MAUI project.
  2. Attach a TouchBehavior to a control i.e. Grid
  3. Wire up the LongPressCompleted event to an event handler

Link to public reproduction project repository

LongPressSample.zip

Environment

- .NET MAUI CommunityToolkit: 9.0.3
- OS: iOS/Android
- .NET MAUI: 8.0.82

Anything else?

No response

Copy link
Contributor

Hi @velocitysystems. We have added the "needs reproduction" label to this issue, which indicates that we cannot take further action. This issue will be closed automatically in 5 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.

@velocitysystems
Copy link
Author

velocitysystems commented Aug 30, 2024

@brminnick I have added a repro project (see attached).

@brminnick
Copy link
Collaborator

Thanks! I suspect we're checking for whether ICommand?.CanExecute() is true which would block it from executing.

I'll dive into the code and take a look when I return from my work trip this week.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working unverified
Projects
None yet
Development

No branches or pull requests

2 participants