Skip to content

Commit 796321d

Browse files
Merge pull request #141 from Anandh-SF4665/main
Fixed SfPopup does not show up after repeated opening issue.
2 parents 88cf41d + 1d8f796 commit 796321d

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

maui/src/Popup/SfPopup/SfPopup.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2261,8 +2261,6 @@ void ApplyOverlayBackground()
22612261
{
22622262
_popupOverlayContainer.ApplyBackgroundColor(Colors.Transparent);
22632263
}
2264-
2265-
_popupOverlayContainer.IsVisible = true;
22662264
}
22672265
}
22682266

@@ -3156,6 +3154,14 @@ void SetParent()
31563154
if (_popupOverlayContainer.Parent is null || _popupView.Parent is null)
31573155
{
31583156
_popupOverlayContainer.Parent = page;
3157+
3158+
// _popupOverlayContainer visibility is set to false after dismissing the popup.
3159+
// _popupOverlayContainer will be set as the parent to popupView here from DisplayPopup().
3160+
// Due to Maui 9.0.50 changes [https://github.com/dotnet/maui/pull/20154],
3161+
// the IsVisible property of _popupView is set to false when reopening with the same instance of the popup, since _popupOverlayContainer visibility will now be false.
3162+
// _popupOverlayContainer visibility is set to true in a later section, but _popupView visibility will still remain false.
3163+
// causes popup to appear blank for second time.
3164+
_popupOverlayContainer.IsVisible = true;
31593165
_popupView.Parent = _popupOverlayContainer;
31603166
}
31613167
}

0 commit comments

Comments
 (0)