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] TouchBehavior does not work on Button in Windows #2538

Open
2 tasks done
TheInnoventor opened this issue Feb 19, 2025 · 0 comments
Open
2 tasks done

[BUG] TouchBehavior does not work on Button in Windows #2538

TheInnoventor opened this issue Feb 19, 2025 · 0 comments
Labels
area/behaviors Issue/Discussion/PR that has to do with Behaviors bug Something isn't working unverified

Comments

@TheInnoventor
Copy link

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

TouchBehavior does not seem to work on Button controls in Windows. Works as expected on Android. Command (short click/tap) and LongPressCommand are nether one triggered when using TouchBehavior on a Button. Moving the TouchBehavior definition up to a Label (and changing it to a Label type obviously) works as expected on both platforms. Moving it to an Image also works on both platforms. Moving it back to the Button results in the short and long taps being registered on Android only, and not Windows.

Expected Behavior

I expect that TouchBehavior (particularly Long Presses) work the same way across platforms.

Steps To Reproduce

  1. Open attached project (which is a File New project with the DotNet bot image and I added some TouchBehaviors).
  2. Build and run Android version.
  3. Observe that a quick tap and a LongPress works on the Button, the bottom Label, and the Image. Both TouchBehaviors work on all 3 controls on Android.
  4. Build and run Windows version.
  5. Observe that clicking the Label and the Image works as expected. Also observe that a LongPress (with the mouse click) also works as expected.
  6. Observe that clicking the Button does not work, nor does a LongPress. Neither TouchBehavior works on the Button in Windows.

Link to public reproduction project repository

https://github.com/TheInnoventor/LongPressTest

Environment

- .NET MAUI CommunityToolkit: 11.1.0
- OS: Windows 10
- .NET MAUI: 9.0.40

Anything else?

No response

@TheInnoventor TheInnoventor added bug Something isn't working unverified labels Feb 19, 2025
@vhugogarcia vhugogarcia added the area/behaviors Issue/Discussion/PR that has to do with Behaviors label Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/behaviors Issue/Discussion/PR that has to do with Behaviors bug Something isn't working unverified
Projects
None yet
Development

No branches or pull requests

2 participants