Closed primozcerar closed 8 months ago
Hi @primozcerar. We have added the "needs reproduction" label to this issue, which indicates that we cannot take further action. This issue will be closed automatically in 5 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
@bijington I'm sorry I can not currently create a reproduction repo as I am working on a project with an extremely tight deadline. I will get back to it when I can if you can't reproduce it. This is however a serious issue for me right now and I might have to temporarily drop iOS support because of it as I have found no workaround and redesigning the Popup or splitting it into multiple popups would take too much time and look unprofessional.
I have just found a workaround that might help with solving this issue or help anyone stuck on this. It is resolved by measuring the Popup.Content size and then assigning it to the content.parent element.
(Dialog.Content!.Parent as VisualElement)!.HeightRequest = measuredSize.Height;
Although not Popup, I have experienced a problem similar to this on the .NET MAUI side. I remember implementing workarounds like the one you described.
@primozcerar , @bijington , I don't know if this is the same issue, but I reproduced it below.
<toolkit:Popup xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
x:Class="MauiComm_IssuePopupGesture.PopupPage1"
Size="200,200" HorizontalOptions="Center" VerticalOptions="Center">
<Grid x:Name="gdTest" RowDefinitions="*,44,44,44" SizeChanged="gdTest_SizeChanged" VerticalOptions="Start" HeightRequest="200">
<Label Grid.Row="0" Text="This is gesture test." />
<Label Grid.Row="1" x:Name="lblTapTimes" Text="Tap Times : 0" />
<Button Grid.Row="2" x:Name="btnChangeSize" Text="Size Change" Clicked="btnChangeSize_Clicked" />
<Button Grid.Row="3" x:Name="btnClick" Text="Click" Clicked="btnClick_Clicked" />
</Grid>
</toolkit:Popup>
void btnChangeSize_Clicked(object sender, EventArgs e)
{
gdTest.HeightRequest = 250;
}
void btnClick_Clicked(object sender, EventArgs e)
{
lblTapTimes.Text = "Tap Times : " + (++tapTimes);
}
void gdTest_SizeChanged(object sender, EventArgs e)
{
Size = new Size(Size.Width, gdTest.Height);
// (Content!.Parent as VisualElement)!.HeightRequest = gdTest.Height; // <= workaround code
}
Below is the verification video.
https://github.com/CommunityToolkit/Maui/assets/125236133/a665f531-8dc1-4351-b9b6-4ee8a5603e21
Uncommenting the workaround code works as intended.
https://github.com/CommunityToolkit/Maui/assets/125236133/24787e34-53b3-4f0f-9588-4c1b78a0d443
If the problem is the same, it is possible to upload the reproduction code.
@cat0363 Thank you very much. That is exactly the issue I am facing.
@primozcerar , Thank you for confirmation.
I have uploaded the reproduction code below. https://github.com/cat0363/MauiComm-IssuePopupGesture.git
I am running into an issue where the gesture recognizer attached to a Border within a Popup isn't being hit upon a tap/click. This is also on iOS. Here is a reproducer I pushed to GH. Should I open a separate issue, or is this caused by the same bug? This isn't a MAUI bug it seems - when using the same controls inside a ContentPage instead of a Popup, not able to repro.
Is there an existing issue for this?
Did you read the "Reporting a bug" section on Contributing file?
Current Behavior
After increasing Popup height any elements outside of original bounds do not receive touches.
Expected Behavior
Touches should be received by any element on the popup even after increasing it's size
Steps To Reproduce
Link to public reproduction project repository
https://github.com/cat0363/MauiComm-IssuePopupGesture
Environment
Anything else?
No response