Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple gesture interaction #16162

Open
latnec opened this issue Jun 28, 2024 · 0 comments
Open

Multiple gesture interaction #16162

latnec opened this issue Jun 28, 2024 · 0 comments
Labels

Comments

@latnec
Copy link

latnec commented Jun 28, 2024

Describe the bug

This is very similar to the issue described here: #3133.

In particular:

The gestures recognizers collection contains two gesture recognizers

one is looking for single finger touch gestures
the second is looking for two finger touch gestures
Both recognizers will receive a PointerPressed event when the first finger touch occurs, both store the pointer information (touch ID etc).
The finger is moved triggering PointerMoved events for both recognizers.
The first recognizer now decides this is a single finger gesture and captures the input via IGestureRecognizerActionsDispatcher.
From this time forwards only the first recognizer receives pointer (touch) events for the touch ID.

The finger is removed and the first recognizer gets a PointerReleased event.
The second recognizer never gets a notification to discard the touch ID.

Now another single finger down occurs and both recognizers receive a PointerPressed event with a new touch ID.
The second gesture recognizer now thinks there is a two finger touch in progress.
The first recognizer thinks there is a single touch in progress.

To Reproduce

Create a control and enable 2 gestures:

UserControl.GestureRecognizers> <PinchGestureRecognizer/> <ScrollGestureRecognizer CanHorizontallyScroll="True" CanVerticallyScroll="True"/> </UserControl.GestureRecognizers>

Expected behavior

After releasing the initial tap (to scroll) the next single tap should still be handled by scroll. Instead it is recognized as a second concurrent tap and handled by zoom instead

Avalonia version

11.0.11

OS

WebAssembly

Additional context

No response

@latnec latnec added the bug label Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant