Skip to content

[Android] [iOS] [macOS] CascadeInputTransparent="False" still not working on ContentView #21002

@Felicity-R

Description

@Felicity-R

Description

#10977 was closed as fixed by #14846, but I can still reproduce the issue after updating to .Net 8.

Steps to Reproduce

Same as linked issue

  1. Create a new Maui app in Visual Studio - choosing the .net 8 template - with the button click sample code.
  2. Replace the content of MainPage.xml with:
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="ContentViewCascadeInputTransparent.MainPage">

        <ContentView InputTransparent="True" CascadeInputTransparent="False"
            Padding="30,0">

            <Button
                x:Name="CounterBtn"
                Text="Click me" 
                SemanticProperties.Hint="Counts the number of times you click"
                Clicked="OnCounterClicked"
                HorizontalOptions="Fill" />
        </ContentView>

</ContentPage>

Expected Result:

Button is still clickable as InputTransparent should not cascade

Actual Result:

Button is not clickable.
If you replace the ContentView with another layout like a VerticalStackLayout then it works fine.

Link to public reproduction project repository

https://github.com/Felicity-R/ContentViewCascadeInputTransparent

Version with bug

8.0.3 GA

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

No response

Did you find any workaround?

Can't use ContentView; need to use a different layout.

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-layoutStackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresentermigration-compatibilityXamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convertp/1Work that is important, and has been scheduled for release in this or an upcoming sprintplatform/androidplatform/iosplatform/macosmacOS / Mac Catalystt/bugSomething isn't working

    Type

    No type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions