Skip to content

Commit 94bee57

Browse files
Fix back button
1 parent 6b05e6a commit 94bee57

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

src/CommunityToolkit.Maui/Views/Popup/PopupContainer.cs

+9-4
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,15 @@ public PopupContainer(Popup content, TaskCompletionSource<PopupResult>? taskComp
4747
On<iOS>().SetModalPresentationStyle(UIModalPresentationStyle.OverFullScreen);
4848
}
4949

50-
//protected override bool OnBackButtonPressed()
51-
//{
52-
// return !CanBeDismissedByTappingOutsideOfPopup;
53-
//}
50+
protected override bool OnBackButtonPressed()
51+
{
52+
if (CanBeDismissedByTappingOutsideOfPopup)
53+
{
54+
return base.OnBackButtonPressed();
55+
}
56+
57+
return true;
58+
}
5459

5560
/// <summary>
5661
/// Gets or sets a value indicating whether the popup can be dismissed by tapping outside the Popup.

0 commit comments

Comments
 (0)