Skip to content
10 changes: 3 additions & 7 deletions src/CommunityToolkit.Maui/Views/Popup/PopupPage.shared.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Globalization;
using CommunityToolkit.Maui.Converters;
using CommunityToolkit.Maui.Core;
using CommunityToolkit.Maui.Extensions;
using Microsoft.Maui.Controls.PlatformConfiguration;
using Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;
using Microsoft.Maui.Controls.Shapes;
Expand Down Expand Up @@ -43,11 +44,6 @@ public PopupPage(Popup popup, IPopupOptions popupOptions)
// Only set the content if the parent constructor hasn't set the content already; don't override content if it already exists
base.Content ??= new PopupPageLayout(popup, popupOptions);

if (Shell.Current is Shell shell)
{
Shell.SetPresentationMode(shell, PresentationMode.ModalNotAnimated);
}

tapOutsideOfPopupCommand = new Command(async () =>
{
popupOptions.OnTappingOutsideOfPopup?.Invoke();
Expand Down Expand Up @@ -114,9 +110,9 @@ protected override bool OnBackButtonPressed()
{
if (popupOptions.CanBeDismissedByTappingOutsideOfPopup)
{
return base.OnBackButtonPressed();
CloseAsync(new PopupResult(true), CancellationToken.None).SafeFireAndForget();
}

return true;
}

Expand Down
Loading