diff --git a/src/CommunityToolkit.Maui/Views/Popup/PopupContainer.cs b/src/CommunityToolkit.Maui/Views/Popup/PopupContainer.cs index d5bc9ff0e..64c81fd76 100644 --- a/src/CommunityToolkit.Maui/Views/Popup/PopupContainer.cs +++ b/src/CommunityToolkit.Maui/Views/Popup/PopupContainer.cs @@ -47,10 +47,15 @@ public PopupContainer(Popup content, TaskCompletionSource? taskComp On().SetModalPresentationStyle(UIModalPresentationStyle.OverFullScreen); } - //protected override bool OnBackButtonPressed() - //{ - // return !CanBeDismissedByTappingOutsideOfPopup; - //} + protected override bool OnBackButtonPressed() + { + if (CanBeDismissedByTappingOutsideOfPopup) + { + return base.OnBackButtonPressed(); + } + + return true; + } /// /// Gets or sets a value indicating whether the popup can be dismissed by tapping outside the Popup.