diff --git a/src/CommunityToolkit.Maui.Core/Handlers/Popup/PopupHandler.shared.cs b/src/CommunityToolkit.Maui.Core/Handlers/Popup/PopupHandler.shared.cs index 99ba51ba3..128a15696 100644 --- a/src/CommunityToolkit.Maui.Core/Handlers/Popup/PopupHandler.shared.cs +++ b/src/CommunityToolkit.Maui.Core/Handlers/Popup/PopupHandler.shared.cs @@ -23,9 +23,9 @@ public partial class PopupHandler /// public static CommandMapper PopUpCommandMapper = new(ElementCommandMapper) { - [nameof(IPopup.OnClosed)] = MapOnClosed, #if !(IOS || MACCATALYST) [nameof(IPopup.OnOpened)] = MapOnOpened, + [nameof(IPopup.OnClosed)] = MapOnClosed, #endif [nameof(IPopup.OnDismissedByTappingOutsideOfPopup)] = MapOnDismissedByTappingOutsideOfPopup }; diff --git a/src/CommunityToolkit.Maui/HandlerImplementation/Popup/Popup.macios.cs b/src/CommunityToolkit.Maui/HandlerImplementation/Popup/Popup.macios.cs index e703ff519..439bb0c75 100644 --- a/src/CommunityToolkit.Maui/HandlerImplementation/Popup/Popup.macios.cs +++ b/src/CommunityToolkit.Maui/HandlerImplementation/Popup/Popup.macios.cs @@ -44,6 +44,8 @@ static PageHandler CreatePageHandler(IPopup virtualView) /// We don't need to provide the result parameter here. public static void MapOnClosed(PopupHandler handler, IPopup view, object? result) { + PopupHandler.MapOnClosed(handler, view, result); + var parent = view.Parent as Element; if (parent is not null) {