Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: adjust workaround for android popuppanel layout #18277

Merged
merged 4 commits into from
Sep 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/Uno.UI/UI/Xaml/Controls/Popup/PopupPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ Popup.PlacementTarget is not null

ArrangeElement(child, finalFrame);

// Temporary workaround to avoid layout cycle on iOS. This block was added specifically for a bug on Android's
// MenuFlyout so, for now, we restrict to to only Android
// This can be re-evaluated and removed after https://github.com/unoplatform/uno/pull/18261 merges
#if !__IOS__
var updatedFinalFrame = new Rect(
anchorLocation.X + (float)Popup.HorizontalOffset,
anchorLocation.Y + (float)Popup.VerticalOffset,
Expand All @@ -193,6 +197,7 @@ Popup.PlacementTarget is not null
// See MenuFlyoutSubItem_Placement sample.
ArrangeElement(child, updatedFinalFrame);
}
#endif

if (this.Log().IsEnabled(LogLevel.Debug))
{
Expand Down
Loading