Repository navigation
Open
Labels
area-layoutStackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenterp/2Work that is important, but is currently not scheduled for releasepartnerIssue or Request from a partner teampartner/cat π»this is an issue that impacts one of our partners or a customer our advisory team is engaged withplatform/androidt/bugSomething isn't working
Milestone
Description
Description
I overlayed two Stack Layouts on top of each other using AbsoluteLayout and I was still able to interact with the button in the StackLayout . Is this expected because to my knowledge the second StackLayout should block interaction with the main StackLayout.
Steps to Reproduce
- Create a .net MAUI app
- Copy below code to the XAML file:
<?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="MauiApp2.MainPage">
<AbsoluteLayout>
<StackLayout AbsoluteLayout.LayoutFlags="All"
AbsoluteLayout.LayoutBounds="0,0,1,1"
Margin="5">
<Button Text="Clic Me!" BackgroundColor="GreenYellow" Clicked="Button_Clicked"/>
</StackLayout>
<StackLayout AbsoluteLayout.LayoutFlags="All"
AbsoluteLayout.LayoutBounds="0,0,1,1"
BackgroundColor="Gray"
Opacity="0.6">
</StackLayout>
</AbsoluteLayout>
</ContentPage>- Copy below code in the code behind file:
namespace MauiApp2;
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
}
private void Button_Clicked(object sender, EventArgs e)
{
DisplayAlert("", "Hello World", "Cancel");
}
}- Run the app
- Click the button (which is placed in the first StackLayout) and it will fire the alert; the second StackLayout should block interaction with the first one.
Link to public reproduction project repository
No link
Version with bug
Unknown/Other (please specify)
Last version that worked well
Unknown/Other
Affected platforms
Android, I was not able test on other platforms
Affected platform versions
Android 9
Did you find any workaround?
No response
Relevant log output
No response
Reacted by JosΓ© Luis, Jon McGuire, rhaly, Michele Nucci, riccardominato, Christopher Stephan, Yunus Efendi, Kaushalya Dharmarathna, Pavel HoleΔek and Luis Henrique
Metadata
Metadata
Assignees
Labels
area-layoutStackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenterp/2Work that is important, but is currently not scheduled for releasepartnerIssue or Request from a partner teampartner/cat π»this is an issue that impacts one of our partners or a customer our advisory team is engaged withplatform/androidt/bugSomething isn't working
Activity
[-]Overlaying a StackLayout another StackLayout does not block interaction [/-][+]Overlaying a StackLayout on another StackLayout does not block interaction [/+]alfarajali commentedon Sep 23, 2022
Is there any workaround to address this requirement?
eynerdevp commentedon Jan 4, 2023
still not working
Implement touch interception for layouts
mattleibow commentedon May 1, 2023
There was a workaround found in #9153 (comment)
25 remaining items
MarMarIV commentedon Jul 3, 2024
Same problem occured on iOS platform, on version 8.0.61
Is there any progress? Or workaround?
riccardominato commentedon Jul 3, 2024
@MarMarIV Look at #9153 (comment) or #10252 (comment)
yaseenCh commentedon Jul 15, 2024
i have an issue in maui when i load data during this period when i click on my screen my app is crashing. if i dont touch the screen then its work fine . i have do every things like is enabled event fields dusring data loading but during loading click not click but after that it trigring all clicks and app will be crash. i have also async all function but still when i attach data its stucked for some time
holecekp commentedon Dec 17, 2024
The problem is still in the latest .NET MAUI 9 version on Android (in Border and Grid in my case). However, at least the workaround with adding a TapGestureRecognizer works.
cagriy commentedon Jan 11, 2025
Hi @PureWeen , is it possible to move this one to NET9 Servicing? It was on NET 8 Servicing, but that one is closed now as far as I can see.
janseris commentedon Mar 23, 2025
This will only block touch interaction. You can stil activate controls using Tab and Enter keys on keyboard.