Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/CommunityToolkit.Maui/Views/Popup/PopupPage.shared.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,11 @@ public async Task CloseAsync(PopupResult result, CancellationToken token = defau

protected override bool OnBackButtonPressed()
{
// Only close the Popup if CanBeDismissedByTappingOutsideOfPopup is true
if (GetCanBeDismissedByTappingOutsideOfPopup(popup, popupOptions))
// When the Android Back Button is tapped, we only close the Popup if the tapOutsideOfPopupCommand can execute
// In other words, we'll only close the Popup when CanBeDismissedByTappingOutsideOfPopup is true
if (tapOutsideOfPopupCommand.CanExecute(null))
{
CloseAsync(new PopupResult(true), CancellationToken.None).SafeFireAndForget();
tapOutsideOfPopupCommand.Execute(null);
}

// Always return true to let the Android Operating System know that we are manually handling the Navigation request from the Android Back Button
Expand Down
Loading