CommunityToolkit / Maui

The .NET MAUI Community Toolkit is a community-created library that contains .NET MAUI Extensions, Advanced UI/UX Controls, and Behaviors to help make your life as a .NET MAUI developer easier
https://learn.microsoft.com/dotnet/communitytoolkit/maui
MIT License
2.1k stars 340 forks source link

[BUG] [Android] TouchBehavior alters the background color of its attached element unexpectedly #1826

Open mfeingol opened 1 month ago

mfeingol commented 1 month ago

Is there an existing issue for this?

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

Current Behavior

TouchBehavior alters the background color of its attached element unexpectedly.

Expected Behavior

TouchBehavior should not change the background color of its attached element unless requested to do so.

Related: ideally there'd be a LongPressedBackgroundColor property on TouchBehavior.

Steps To Reproduce

  1. Run the repro project
  2. Long-press the "welcome" text label/grid
  3. Hit back
  4. Long-press it again
  5. Hit back
  6. Note that the background color for the text label/grid is now stuck

Link to public reproduction project repository

https://github.com/mfeingol/repros/tree/master/BackgroundColorStuckRepro

Environment

- .NET MAUI CommunityToolkit: 8.0.1
- OS: Android
- .NET MAUI: 8.0.20

Anything else?

No response