You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] TouchBehavior: Tap and LongPress conflict (Tap fires after LongPress, or LongPress misfires as Tap) #2894
When using TouchBehavior to handle both tap and long‑press gestures on the same control, the events/commands overlap in unexpected ways.
If you attach both TouchGestureCompleted and LongPressCompleted, a long press triggers both handlers.
If you mix TapGestureRecognizer with TouchBehavior.LongPressCommand, sometimes a long press also triggers a tap, or two quick taps are mis‑interpreted as a long press.
This makes it difficult to reliably distinguish between a quick tap and a long press.
Expected Behavior
Expected behavior
Quick tap → only OnTapCompleted fires.
Long press → only OnLongPressCompleted fires.
Steps To Reproduce
Reproduction
MainPage.xaml
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
x:Class="TouchBugDemo.MainPage">
<Grid Padding="40">
<Grid.Behaviors>
<toolkit:TouchBehavior
LongPressDuration="5000"
TouchGestureCompleted="OnTapCompleted"
LongPressCompleted="OnLongPressCompleted" />
</Grid.Behaviors>
<Border Stroke="Gray" StrokeThickness="2" Padding="20">
<Label Text="Tap or Long Press me"
HorizontalOptions="Center"
VerticalOptions="Center" />
</Border>
</Grid>
</ContentPage>
- .NET MAUI CommunityToolkit: 12.2.0
- OS: Microsoft Windows 10 Pro - 10.0.19045 Graditev 19045
- .NET MAUI: 9.0.110
Anything else?
Sometimes if you do fast taps, then do a long press. You will get multiple long press fired in a short amount of time (less then the LongPressDuration).
Activity
development-jantar commentedon Dec 18, 2025
@jamesbrooksbank @TheCodeTraveler — polite bump.
The ticket hasn’t received any comments yet, so I just wanted to check whether you will have a chance to look at the details above. Thank you!
Dhaval023 commentedon Mar 31, 2026
Is there any update on this?
rokmeglicbit commentedon Aug 27, 2026
I think the alternative is to wait for MAUI NET 11.0, https://github.com/dotnet/maui-samples/tree/main/11.0/UserInterface/Gestures/LongPressGesture.
Add device tests for platform-specific code, run them in CI, and fix …