Skip to content

PanGestureRecognizer behaves differently on Windows to other platforms #24252

@beeradmoore

Description

@beeradmoore

Description

On macOS, iOS, and Android, if you have overlapping PanGestureRecognizers only the top most will fire. Internally I assume MAUI is stopping the event propegating to lower views.
On Windows it allows the both PanGestureRecognizers to run.

I am unsure if this is specific to PanGestureRecognizer or if overlapped TapGestureRecognizer would do the same.

EDIT: I tested with TapGestureRecognizer and it behaves correctly across all 4 platforms.

Steps to Reproduce

  1. Add a gesture recognizer to a view (in my case PanGestureRecognizer)
  2. Add a gesture recognizer to a child view (in my case PanGestureRecognizer again)
  3. Run the application and click on the overlapping gesture recognizers

Link to public reproduction project repository

https://github.com/beeradmoore/maui-issue-PanGesutreHandling

Version with bug

8.0.80 SR8

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

Windows 11

Did you find any workaround?

The project I discovered this I had a image and I want to select the image corners to resize, and anywhere else to resize.

My planned workaround is to instead make a 3x3 grid over the image where the 4 corners will handle resize, and the other 5 positions will handle pan.

Relevant log output

N/A

Sample videos

Tested on multiple platforms. Text in the top left of the screen will show what gesture recognizer is active.

Windows

Recording.2024-08-15.124212.mp4

macOS

Screen.Recording.2024-08-15.at.1.25.36.PM.mov

iOS

I tested on iOS sumulator and device. This screen recording is iOS simulator.

Simulator.Screen.Recording.-.iPhone.15.-.2024-08-15.at.13.22.48.mp4

Android

I only tested on emulator. Android exhibits its own problems with my drag implementation. But it does not trigger multiple pan gestures running at once.

(EDIT: The flickering on Android appears to be related to #20772. The sample code in this comment fixes the flicking)

android.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-gesturesGesture typesp/2Work that is important, but is currently not scheduled for releasepartner/syncfusionIssues / PR's with Syncfusion collaborationplatform/windowss/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions