Skip to content

[Android] DragGestureRecognizer DragStarting Command/Event fired prematurely #35752

Description

@PatB-Genetec

Description

Only working with Android/iOS and it happens only on Android.
We were using Maui 10.0.20 and the DragStarting Command/Event was fired after the long press when you were actually able to start dragging the element around.
We updated to Maui 10.0.51 and the DragStarting Command/Event is fired immediately when you touch the element, before you are able to drag it.
I tested all the other Maui version and the problem has been introduced in 10.0.40

Steps to Reproduce

Create a new MAUI App named TestMaui
Make sure you use Maui 10.0.40 or higher
Change your MainPage.xaml to :

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:local="clr-namespace:TestMaui"
             x:Class="TestMaui.MainPage"
             x:Name="ThisPage">

    <!-- Root layout that fills the whole page -->
    <AbsoluteLayout x:Name="RootLayout"
        BackgroundColor="Pink">
        <AbsoluteLayout.GestureRecognizers>
            <DropGestureRecognizer DragOver="OnDragOver"
                                   Drop="OnDrop"
                                   DragLeave="OnDragLeave" />
        </AbsoluteLayout.GestureRecognizers>

        <!-- Draggable blue box -->
        <BoxView
             BackgroundColor="Blue"
             AbsoluteLayout.LayoutFlags="None"
             AbsoluteLayout.LayoutBounds="20,20,200,200">
            <BoxView.GestureRecognizers>
                <DragGestureRecognizer DragStartingCommand="{Binding Source={x:Reference ThisPage}, Path=DragStartingCommand}"
                                       DragStarting="OnDragStarting">
                </DragGestureRecognizer>
            </BoxView.GestureRecognizers>
        </BoxView>

    </AbsoluteLayout>

</ContentPage>

Change your MainPage.xaml.cs to

using System.Windows.Input;

namespace TestMaui;

public partial class MainPage : ContentPage
{
    public MainPage()
    {
        DragStartingCommand = new Command(() => { Console.WriteLine("========== DragStarting command triggered"); });

        InitializeComponent();
    }

    public ICommand DragStartingCommand { get; }

    private void OnDragOver(object? sender, DragEventArgs e)
    {
        Console.WriteLine("========== Dragging over the drop zone");
    }

    private void OnDrop(object? sender, DropEventArgs e)
    {
        Console.WriteLine("========== Dropped onto the drop zone");
    }

    private void OnDragLeave(object? sender, DragEventArgs e)
    {
        Console.WriteLine("========== Drag left the drop zone");
    }

    private void OnDragStarting(object? sender, DragStartingEventArgs e)
    {
        Console.WriteLine("========== DragStarting event triggered");
    }
}

Start the app
Tap on the Blue square. You should see logs saying :
"========== DragStarting command triggered"
"========== DragStarting event triggered"

Those events/commands should be fired AFTER a long press, not as soon as you tap the component.
Change your Maui version to something < 10.0.40 like 10.0.20.
Start the app
Tap on the Blue square. You should NOT see the logs.
Long press the Blue square
At the end of the long press, when the square scales up a bit, you should see the logs.

Link to public reproduction project repository

No response

Version with bug

10.0.40

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

10.0.30

Affected platforms

Android

Affected platform versions

Only tested on Android 16

Did you find any workaround?

No

Relevant log output

Activity

  1. NafeelaNazhir commented on Jun 4, 2026

    @NafeelaNazhir
    Contributor

    This issue has been validated in Visual Studio Code 1.123.0 with .NET MAUI versions 10.0.31, 10.0.40 & 10.0.70. It was reproducible on Android platform from 10.0.40 Version.

    Screen.Recording.2026-06-04.at.11.23.02.AM.mov
  2. added
    s/triagedIssue has been reviewed
    s/verifiedVerified / Reproducible Issue ready for Engineering Triage
    i/regressionThis issue described a confirmed regression on a currently supported version
    on Jun 4, 2026
  3. added this to the Backlog milestone on Jun 8, 2026
  4. added a commit that references this issue on Jun 8, 2026
    583a22a
  5. added a commit that references this issue on Jun 11, 2026
    a0fcea0
  6. removed this from the .NET 10 SR8 milestone on Jun 18, 2026
  7. 3 remaining items

  8. added 2 commits that reference this issue on Jul 3, 2026
    1123745
    15d611a
  9. added 2 commits that reference this issue on Jul 7, 2026
    a09333a
    490c049
  10. added 2 commits that reference this issue on Jul 10, 2026
    a3db7c2
    10d189b
  11. added a commit that references this issue on Jul 22, 2026
    e4b3dfe
  12. added 2 commits that reference this issue on Jul 28, 2026
    b26d217
    542c280
  13. added a commit that references this issue on Aug 7, 2026
    188dc31
  14. added a commit that references this issue on Aug 10, 2026
  15. locked and limited conversation to collaborators on Sep 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-gesturesGesture typesi/regressionThis issue described a confirmed regression on a currently supported versionpartner/syncfusionIssues / PR's with Syncfusion collaborationplatform/androidregressed-in-10.0.40s/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions