Skip to content

Leave guard (unsaved changes)

A dirty editor blocks in-SPA navigation via LeaveGuard; tab-close/reload via beforeunload.

Draft (clean)

While dirty, every navigation away is cancelled preventively: no address-bar flicker, no broken Back button. A navigation between this route's own parameters wouldn't fire the guard - only actually leaving does.

External navigation

Toggles SetConfirmExternalNavigationAsync at runtime - the pattern a dirty-form tracker uses. (Browsers only show the dialog after you've interacted with the page.)