maui icon indicating copy to clipboard operation
maui copied to clipboard

Buttons with DragGestureRecogniser doesn't fire default Command on Android

Open xibeat opened this issue 1 year ago • 3 comments

Description

Hello, I wanted to implement a functionality where you can drag a button as well as single tap/click on it. It works in iOS and Mac Catalyst. However in Android, it only responds to drag event. The normal Command/TapGesture is not firing. Does anyone has a workaround for the same?

Steps to Reproduce

  1. Add a Button in Xaml.
               <Button
                    Command="{Binding DefaultClickCommand}"
                    HorizontalOptions="Center"
                    Text="Button">
                    <Button.GestureRecognizers>
                        <DragGestureRecognizer DragStartingCommand="{Binding ButtonStartDragCommand}" />
                    </Button.GestureRecognizers>
                </Button>
  1. Run the project on iOS. DefaultClickCommand and ButtonStartDragCommand working as expected.
  2. Run the project on Android. Only DragCommand is being fired. Button Click will not do anything.

Link to public reproduction project repository

No response

Version with bug

8.0.3

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 13

Did you find any workaround?

no workaround found.

Relevant log output

No response

xibeat avatar Nov 29 '23 14:11 xibeat