Skip to content
Merged
Changes from 2 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 @@ -102,10 +102,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))
Comment thread
TheCodeTraveler marked this conversation as resolved.
{
CloseAsync(new PopupResult(true), CancellationToken.None).SafeFireAndForget();
tapOutsideOfPopupCommand.Execute(null);
Comment thread
TheCodeTraveler marked this conversation as resolved.
}

// 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