I’m building a .NET MAUI Blazor Hybrid app, and I want to handle back navigation (both swipe gestures and the hardware/software back button).
Here’s what I need:
If the user swipes back (like iOS gesture) or presses the back button,→ and I have a popup (Blazor component) open,→ I want to close only the popup, not navigate away from the current page.
If there’s no popup open, the normal navigation back should happen.
So basically:Swipe-back or back button → if popup is open → close it and stay on the same page.