From e6cf3d7fcac71bad771413ee7918ca136f8267e3 Mon Sep 17 00:00:00 2001 From: Tyson Elliot Hooker Date: Mon, 16 Jan 2023 12:59:04 +1100 Subject: [PATCH] Added in MacCatalyst fix the same as iOS as it works in a similar fashion --- .../Mopups.Maui/Platforms/MacCatalyst/PopupWindow.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Mopups/Mopups.Maui/Platforms/MacCatalyst/PopupWindow.cs b/Mopups/Mopups.Maui/Platforms/MacCatalyst/PopupWindow.cs index 89c3299..81be2bf 100644 --- a/Mopups/Mopups.Maui/Platforms/MacCatalyst/PopupWindow.cs +++ b/Mopups/Mopups.Maui/Platforms/MacCatalyst/PopupWindow.cs @@ -34,14 +34,16 @@ public override UIView HitTest(CGPoint point, UIEvent? uievent) if (formsElement.InputTransparent) return null!; - if (formsElement.BackgroundInputTransparent && renderer?.PlatformView == hitTestResult) + if ((formsElement.BackgroundInputTransparent || formsElement.CloseWhenBackgroundIsClicked) && renderer?.PlatformView == hitTestResult) { formsElement.SendBackgroundClick(); - - return null!; + if (formsElement.BackgroundInputTransparent) + { + return null!; //fires off other handlers? If hit test returns null, it seems that other elements will process the click instead + } } - return hitTestResult; + } } }