Skip to content

Commit aeb9020

Browse files
Fix back button
1 parent 3239df4 commit aeb9020

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

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

Lines changed: 9 additions & 4 deletions
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)