mono / SkiaSharp

SkiaSharp is a cross-platform 2D graphics API for .NET platforms based on Google's Skia Graphics Library. It provides a comprehensive 2D API that can be used across mobile, server and desktop models to render images.
MIT License
4.5k stars 538 forks source link

[BUG] Touch events not passed through on iOS #832

Open Alex-Witkowski opened 5 years ago

Alex-Witkowski commented 5 years ago

Description

When having a SKCanvasView in front of a button the touch events don't reach the button on iOS even if EnableTouchEvents is set to false. Same when setting EnableTouchEvents to true and setting Handeled property of TouchEventArgs to false.

On Andorid everything works as expected.

Code

Case 0: <forms:SKCanvasView EnableTouchEvents="false" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" PaintSurface="Handle_PaintSurface" />

Case 1:

<forms:SKCanvasView EnableTouchEvents="true" HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" Touch="SKCanvasView_OnTouch" PaintSurface="Handle_PaintSurface" />

private async void SKCanvasView_OnTouch(object sender, SKTouchEventArgs e) { e.Handled = false; }

Expected Behavior

When setting EnableTouchEvents to false touch gets passed through to underlying elements. Same when handling touch events and setting handled to false for TouchEventArgs. Just like it works on Android.

Actual Behavior

See description.

Basic Information

Reproduction Link

See for demo application: https://github.com/Alex-Witkowski/SkiaSharpTouchTest

EmmanuelJego commented 3 years ago

Hello!

I am facing the same problem. Did you manage to work around it?

Thanks