CommunityToolkit / CommunityToolkit/Maui
[BUG] Buttons or any view not firing inside Layout that has a TouchBehavior
- Dominant language
- C#
- Stars
- 2.7k
- Forks
- 500
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 7
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Did you read the "Reporting a bug" section on Contributing file?
- [x] I have read the "Reporting a bug" section on Contributing file: https://github.com/CommunityToolkit/Maui/blob/main/CONTRIBUTING.md#reporting-a-bug
### Current Behavior
The touch behavior in the parent view overrides the event on the nested view.
```
```
### Expected Behavior
Click on the button should work when a touch behavior is set on the parent view.
### Steps To Reproduce
1. Download the repo and run it.
2. Click on the button doesn't work while it should work.
### Link to public reproduction project repository
https://github.com/arahmancsd/MauiTouchBehavior.git
### Environment
```markdown
- .NET MAUI CommunityToolkit: 10.0.0
- OS: iOS, Android
- .NET MAUI: 9.0.21
```
### Anything else?
A close issue #2385 shows it is resolved, but it isn't.
Contributor guide
Research direction
Start by running the linked MauiTouchBehavior reproduction on iOS and Android, then trace the TouchBehavior handling for the parent VerticalStackLayout and nested Button. Done means the Button Clicked event fires while the parent TouchBehavior still works, with behavior verified on both reported platforms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, csharp, ios
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100