Skip to content

Commit

Permalink
Fix back button
Browse files Browse the repository at this point in the history
  • Loading branch information
VladislavAntonyuk committed Jan 15, 2025
1 parent 6b05e6a commit 94bee57
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions src/CommunityToolkit.Maui/Views/Popup/PopupContainer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,15 @@ public PopupContainer(Popup content, TaskCompletionSource<PopupResult>? taskComp
On<iOS>().SetModalPresentationStyle(UIModalPresentationStyle.OverFullScreen);
}

//protected override bool OnBackButtonPressed()
//{
// return !CanBeDismissedByTappingOutsideOfPopup;
//}
protected override bool OnBackButtonPressed()
{
if (CanBeDismissedByTappingOutsideOfPopup)
{
return base.OnBackButtonPressed();
}

return true;
}

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

0 comments on commit 94bee57

Please sign in to comment.