dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.21k stars 1.75k forks source link

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

Open owl-guy opened 1 year ago

owl-guy commented 1 year ago

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

XamlTest commented 1 year ago

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 commented 8 months ago

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

owl-guy commented 7 months ago

Will someone work on this?

mmiller-d8 commented 2 months ago

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 commented 1 month ago

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