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

Pan not detected vertically when the recognizer is inside of a scrollview #17319

Open
owl-guy opened this issue Sep 12, 2023 · 5 comments
Open
Labels
area-gestures Gesture types migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@owl-guy
Copy link

owl-guy commented Sep 12, 2023

Description

When I have a PanGestureRecognizer inside of a ScrollView, the pan is only detected horizontally, not vertically:
maui_pan

I already tried setting the ScrollView's IsEnabled to false and the Orientation to "Neither", but same result. I also tried it in the newest .NET 8 preview, same result. Used to work in Xamarin.Forms.

Steps to Reproduce

  1. Create a new .NET MAUI App with .NET 7
  2. Add a PanGestureRecognizer to a control of your choice, e.g. BoxView
  3. Put the control inside of a ScrollView
  4. The PanUpdated event of the GestureRecognizer only gets called when swiping horizontally (left to right or vice versa), not vertically (top to bottom or vice versa)

Link to public reproduction project repository

https://github.com/owl-guy/PanGestureRecognizerExample

Version with bug

7.0.92

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

@owl-guy owl-guy added the t/bug Something isn't working label Sep 12, 2023
@samhouts samhouts added the migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert label Sep 12, 2023
@Eilon Eilon added the area-gestures Gesture types label Sep 12, 2023
@XamlTest XamlTest added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Sep 13, 2023
@XamlTest
Copy link

Verified this on Visual Studio Enterprise 17.8.0 Preview 1.0. Repro on Android 13.0-API33(8.0.0-preview.7.8842), not repro on Windows 11 and iOS 16.4 with below Project:
PanGestureRecognizerExample.zip

@bill-reiss
Copy link

bill-reiss commented Mar 12, 2024

I have seen the same issue, please +1 on importance, works fine on iOS and Windows, only a problem on Andriod

@owl-guy
Copy link
Author

owl-guy commented Mar 28, 2024

Will someone work on this?

@mmiller-d8
Copy link

mmiller-d8 commented Aug 20, 2024

I'm not sure about scrolling horizontally, but I am seeing this on iOS as well. With a PanGestureRecognizer in the ScrollView, the vertical scrolling is not picked up.

As an aside, the vertical scrolling does work if you touch anything that DOES NOT have a PanGestureRecognizer in it.

This guy is pretty old. Are there plans to pick this one up? It's kind of a big deal for me (and others, I'm sure).

EDIT ***

I guess I didn't pay close enough attention to the OP. I'm actually seeing the exact opposite issue on iOS, but still with vertical movement. The PanGestureRecognizer gets the vertical panning, but the ScrollView does not.

@PATRICKdallat
Copy link

This issue still plagues me :(
Any plans to have this issue investigated?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-gestures Gesture types migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/android 🤖 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants