dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.

Home Page:https://asp.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NavigationManager should be able to cancel the navigation request on LocationChanged in Blazor

kashifasif opened this issue · comments

The NavigationManager should be able to cancel the navigation request on LocationChanged

Sometime we need to cancel the current navigation request let say i want user to stop going back or forward when user has changes into form without saving it and i want to show a Moda/Popup that you have unchanged changes into form etc.

@kashifasif thanks for contacting us.

This is not generally possible as location changed can triggered by several browser mechanics like the user clicking the forward or back button and browser don't currently allow preventing those navigations from happening, as it would be a security issue that would allow an attacker to trap a user in a given page.

This issue has been resolved and has not had any activity for 1 day. It will be closed for housekeeping purposes.

See our Issue Management Policies for more information.