Bug 60567 - InputTransparent applies to children on iOS even when they have it explicitly set to false
Summary: InputTransparent applies to children on iOS even when they have it explicitly...
Status: RESOLVED NOT_ON_ROADMAP
Alias: None
Product: Forms
Classification: Xamarin
Component: iOS ()
Version: 2.4.0
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-11-08 13:03 UTC by Dimitar Dobrev
Modified: 2018-01-14 17:22 UTC (History)
3 users (show)

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

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 NOT_ON_ROADMAP

Description Dimitar Dobrev 2017-11-08 13:03:01 UTC
With the following code:

	<StackLayout InputTransparent="True">
		<Button Text="Not transparent" InputTransparent="False" Clicked="Clicked_Handler" />
	</StackLayout>

Clicked_Handler is never activated when the button is tapped.
Comment 1 Paul DiPietro [MSFT] 2017-11-08 17:00:47 UTC
This is expected behavior.

https://developer.xamarin.com/guides/xamarin-forms/user-interface/layouts/#Input_Transparency
Comment 2 Dimitar Dobrev 2017-11-08 17:15:11 UTC
It is expected when nothing is set on the child. But as you can see, it is in my case. The documentation you've linked only states that transparency of input is carried over to children, not that the same property is ignored for them.

A very common use case for this is for a container to skip input with the exception of certain components in it. With such behaviour of InputTransparent this cannot work making the property almost completely useless.

To sum up, you are only correct in a case such as:

	<StackLayout InputTransparent="True">
		<Button Text="Not transparent" Clicked="Clicked_Handler" />
	</StackLayout>

But not in a case such as:

	<StackLayout InputTransparent="True">
		<Button Text="Not transparent" InputTransparent="False" Clicked="Clicked_Handler" />
	</StackLayout>
Comment 3 Paul DiPietro [MSFT] 2017-11-08 17:50:38 UTC
The behavior is what all of the platforms do now, so it's not an iOS-specific issue. The logic is that if you're disabling input on the entire layout, and as such the change affecting all of its children. We do not have plans to change this at this point in time.