Skip to content

[Android] [iOS] [macOS] ContentView and ScrollView also need to handle InputTransparent#21025

Closed
mattleibow wants to merge 24 commits intomainfrom
dev/transparent-contents
Closed

[Android] [iOS] [macOS] ContentView and ScrollView also need to handle InputTransparent#21025
mattleibow wants to merge 24 commits intomainfrom
dev/transparent-contents

Conversation

@mattleibow
Copy link
Copy Markdown
Member

@mattleibow mattleibow commented Mar 5, 2024

Description of Change

Content views also need to handle the input transparent logic separately - such as ContentView and ScrollView.

If the flow of input transparency is not specifically handled, the native views will be wrapped with a blanket interceptor. In most cases, this is fine - buttons, labels and images do not have content. However, things like layouts, content views and scroll views do have content that needs to respect the cascading input transparency.

Windows PR: #23526

Issues Fixed

Fixes #21002

@mattleibow mattleibow requested a review from a team as a code owner March 5, 2024 21:45
@mattleibow mattleibow changed the title ContentView also needs to handle InputTransparent ContentView and ScrollView also need to handle InputTransparent Mar 5, 2024
{
layoutViewGroup.InputTransparent = layout.InputTransparent;
}
ViewHandler.MapInputTransparent(handler, layout);
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This logic is no longer needed as we do it in the ViewHandler mapper.


#if ANDROID
if (view?.InputTransparent == true)
if (view?.InputTransparent == true && (platformView is null || platformView is not IInputTransparentManagingView))
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line matches the change in the transparency logic - if we can handle it ourselves, we don't wrap.

@Eilon Eilon added the area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter label Mar 5, 2024
@PureWeen
Copy link
Copy Markdown
Member

/rebase

Copy link
Copy Markdown
Contributor

@jsuarezruiz jsuarezruiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems that there are some related tests failing:

ScrollViewInputTransparencySimpleMatrix(True,False,False)

Expected string length 65 but was 62. Strings differ at index 55.
Expected: "...t: ScrollViewTransControlIsClickableIsNotPassThru (SUCCESS 1)"
But was:  "...t: ScrollViewTransControlIsClickableIsNotPassThru (FAIL 1)"

@Eilon Eilon added area-controls-scrollview ScrollView and removed area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter labels May 14, 2024
@mattleibow mattleibow changed the title ContentView and ScrollView also need to handle InputTransparent [Android] [iOS] [macOS] ContentView and ScrollView also need to handle InputTransparent Jul 10, 2024
@maonaoda
Copy link
Copy Markdown
Contributor

How long will this take to wait?

@samhouts samhouts added the stale Indicates a stale issue/pr and will be closed soon label Aug 29, 2024
@DavidV1603
Copy link
Copy Markdown

Hello,

what is the status of this pull request? It would help me and my app a lot, if this would work again, because it breaks some UIs, and I have not found a work around.

Copy link
Copy Markdown
Member

@PureWeen PureWeen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix merge conflicts

@github-project-automation github-project-automation bot moved this from Todo to Changes Requested in MAUI SDK Ongoing May 8, 2025
@PureWeen PureWeen modified the milestones: .NET 9 SR8, .NET 9 SR9 Jun 2, 2025
@PureWeen PureWeen modified the milestones: .NET 9 SR9, .NET 9 SR10 Jul 3, 2025
@PureWeen PureWeen modified the milestones: .NET 9 SR10, .NET 9 SR12 Aug 4, 2025
@PureWeen PureWeen modified the milestones: .NET 9 SR12, .NET 10 SR1 Sep 10, 2025
@PureWeen PureWeen modified the milestones: .NET 10 SR1, .NET 10.0 SR2 Nov 4, 2025
@PureWeen PureWeen modified the milestones: .NET 10.0 SR2, .NET 10 SR4 Dec 13, 2025
@kubaflo
Copy link
Copy Markdown
Contributor

kubaflo commented Jan 17, 2026

Moving it here: #33582

@kubaflo kubaflo closed this Jan 17, 2026
@github-project-automation github-project-automation bot moved this from Changes Requested to Done in MAUI SDK Ongoing Jan 17, 2026
@github-actions github-actions bot locked and limited conversation to collaborators Feb 17, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-scrollview ScrollView stale Indicates a stale issue/pr and will be closed soon

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

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

8 participants