Skip to content

Commit

Permalink
fix(popup): placement issue for wasm/skia
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiaoy312 committed Dec 23, 2020
1 parent cbc9d91 commit 6bc5b92
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/Uno.UI/UI/Xaml/Controls/Popup/PopupBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using Uno.Extensions;
using Uno.UI.DataBinding;
using Windows.UI.Xaml.Media;
using Uno.UI;
#if XAMARIN_IOS
using CoreGraphics;
using UIKit;
Expand Down Expand Up @@ -39,19 +40,15 @@ private protected override void OnUnloaded()
/// <inheritdoc />
protected override Size MeasureOverride(Size availableSize)
{
// As the Child is NOT part of the visual tree, it does not have to be measured,
// and the result size of this Popup is always 0,0

return new Size();
// As the Child is NOT part of the visual tree, it does not have to be measured
return new Size(Width, Height).FiniteOrDefault(default);
}

/// <inheritdoc />
protected override Size ArrangeOverride(Size finalSize)
{
// As the Child is NOT part of the visual tree, it does not have to be arranged,
// and the result size of this Popup is always 0,0

return new Size();
// As the Child is NOT part of the visual tree, it does not have to be arranged
return finalSize;
}

partial void OnIsOpenChangedPartial(bool oldIsOpen, bool newIsOpen)
Expand Down

0 comments on commit 6bc5b92

Please sign in to comment.