Bug 40967 - Layouts intercept all input on iOS.
Summary: Layouts intercept all input on iOS.
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 2.2.0
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-05-09 14:47 UTC by Owen Pellegrin
Modified: 2018-02-01 10:49 UTC (History)
8 users (show)

Tags: ac fr
Is this bug a regression?: ---
Last known good build:


Attachments
Project demonstrating overlay failure. (27.26 KB, application/zip)
2016-05-09 14:47 UTC, Owen Pellegrin
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Owen Pellegrin 2016-05-09 14:47:42 UTC
Created attachment 15944 [details]
Project demonstrating overlay failure.

Our application's a map application. We have a complex OpenGL custom map view over which we place other Xamarin Forms controls. I want to use a Grid-like Layout<View> to place our map in an app state sensitive manner, then place an AbsoluteLayout over the map. I'd like to be able to tap the buttons in my AbsoluteLayout, or tap the map to pan/zoom/etc.

In a really complex layout I'm cleaning up that involves 5-6 layers of nested layouts, this acts as expected. But that layout doesn't properly interact with the Xamarin layout system and had a lot of bugs (our fault) after we upgraded to XF 2.2. So I was tasked with fixing it. When I implement the layout described above, input does not pass through the AbsoluteLayout. I tried setting InputTransparent to false. That makes the map receive taps, but the AbsoluteLayout's children do not.

I've attached a project that demonstrates in a more simplistic layout in Xamarin Forms 2.2. The page contains one AbsoluteLayout that contains a button, and a second AbsoluteLayout that contains another button. Depending on how InputTransparent is set, on iOS you can either click the "overlay" or "overlaid" button, but never both. I expect to be able to click both.

I expect transparent regions of a Layout that contain no children should pass input through. While I would be disappointed to find out this is not the intent, if it were documented I'd work around it. I certainly don't expect different behavior out of different platforms.

I have tried this in Xamarin Forms 2.3, and the behavior persists. I have not tested on Windows Phone, or UWP, and don't have facilities to do so.

I can try to reproduce the complex layout that does what I want, but it will take me some time.
Comment 1 E.Z. Hart [MSFT] 2018-01-19 21:21:02 UTC
PR: https://github.com/xamarin/Xamarin.Forms/pull/1621
Comment 2 Rui Marinho 2018-02-01 10:49:32 UTC
Should be fixed on 2.6.0-pre1