-
Notifications
You must be signed in to change notification settings - Fork 10.7k
[Blazor] Add event to NavigationManager to prevent navigating away from page #23886
Copy link
Copy link
Closed
Labels
✔️ Resolution: DuplicateResolved as a duplicate of another issueResolved as a duplicate of another issueNeeds: DesignThis issue requires design work before implementating.This issue requires design work before implementating.Status: Resolvedaffected-fewThis issue impacts only small number of customersThis issue impacts only small number of customersarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing oneseverity-majorThis label is used by an internal toolThis label is used by an internal tool
Milestone
Metadata
Metadata
Assignees
Labels
✔️ Resolution: DuplicateResolved as a duplicate of another issueResolved as a duplicate of another issueNeeds: DesignThis issue requires design work before implementating.This issue requires design work before implementating.Status: Resolvedaffected-fewThis issue impacts only small number of customersThis issue impacts only small number of customersarea-blazorIncludes: Blazor, Razor ComponentsIncludes: Blazor, Razor ComponentsenhancementThis issue represents an ask for new feature or an enhancement to an existing oneThis issue represents an ask for new feature or an enhancement to an existing oneseverity-majorThis label is used by an internal toolThis label is used by an internal tool
Type
Fields
Give feedbackNo fields configured for issues without a type.
Please provide a way of allowing the coder to prevent a page navigation.
This could be via an event in NavigationManager, or the current component implementing a new ICanDeactivateComponent type of interface - preferably both.
@SteveSandersonMS requested an example app from another APS framework that allows code to prevent the user navigating away from the current page when clicking Back on the browser history.
ng serveContactlinkClick the browser's history back button