Is there an existing issue for this?
Did you read the "Reporting a bug" section on Contributing file?
Current Behavior
When I press an item in a CollectionView using a TouchBehavior, another item is recorded as pressed.
Screen.Recording.2024-05-08.at.12.00.52.PM.mov
Here's how I configure my TouchBehavior on each element of my list
<CollectionView Grid.Row="1" ItemsSource="{Binding Items}">
<CollectionView.ItemsLayout>
<LinearItemsLayout ItemSpacing="4" Orientation="Vertical" />
</CollectionView.ItemsLayout>
<CollectionView.ItemTemplate>
<DataTemplate>
<VerticalStackLayout
Padding="6"
BackgroundColor="LightGray"
HeightRequest="50">
<Label Text="{Binding .}" />
<VerticalStackLayout.Behaviors>
<toolkit:TouchBehavior Command="{Binding Source={x:Reference This}, Path=BindingContext.ItemTapCommandCommand}" CommandParameter="{Binding .}" />
</VerticalStackLayout.Behaviors>
</VerticalStackLayout>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
Expected Behavior
If I press any item in the CollectionView, only the one I press should be registered.
Steps To Reproduce
Have any list with enough items to be able to scroll.
Scroll the list.
Press any items
Link to public reproduction project repository
https://github.com/TiicTac54/TouchBehaviorBugWithCollectionView.git
Environment
- .NET MAUI CommunityToolkit:8.0.x
- OS: Android , iOS
- .NET MAUI:8.0.20
Anything else?
Using a TapGestureRecognizer does not cause this issue.
Is there an existing issue for this?
Did you read the "Reporting a bug" section on Contributing file?
Current Behavior
When I press an item in a CollectionView using a TouchBehavior, another item is recorded as pressed.
Screen.Recording.2024-05-08.at.12.00.52.PM.mov
Here's how I configure my TouchBehavior on each element of my list
Expected Behavior
If I press any item in the CollectionView, only the one I press should be registered.
Steps To Reproduce
Link to public reproduction project repository
https://github.com/TiicTac54/TouchBehaviorBugWithCollectionView.git
Environment
Anything else?
Using a TapGestureRecognizer does not cause this issue.