Skip to content

Commit

Permalink
Added in MacCatalyst fix the same as iOS as it works in a similar fas…
Browse files Browse the repository at this point in the history
…hion
  • Loading branch information
LuckyDucko committed Jan 16, 2023
1 parent 68ffbb4 commit e6cf3d7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Mopups/Mopups.Maui/Platforms/MacCatalyst/PopupWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

}
}
}

0 comments on commit e6cf3d7

Please sign in to comment.