Is there an existing issue for this?
Describe the bug
Using NavigationLock with ConfirmExternalNavigations doesn't show confirm dialog when changing address bar after the initial app load.
Expected Behavior
Confirm dialog is shown after changing the address bar even on first load.
Steps To Reproduce
- Create a Blazor WebAssembly app
- Add
<NavigationLock ConfirmExternalNavigations /> to Index.razor
- Run the app
- After the app loads, change the address bar to a different external address
Exceptions (if any)
None. Browser console looks clean.
.NET Version
7.0.100-rc.1.22429.3
Anything else?
If you navigate internally, like to the Counter page first and then back to Home, then changing the address bar does trigger the confirm dialog.
External links, like an anchor tag pointing to blazor.net on the home page, also successfully get interrupted.
Repros with both Edge and Chrome.
Is there an existing issue for this?
Describe the bug
Using NavigationLock with ConfirmExternalNavigations doesn't show confirm dialog when changing address bar after the initial app load.
Expected Behavior
Confirm dialog is shown after changing the address bar even on first load.
Steps To Reproduce
<NavigationLock ConfirmExternalNavigations />to Index.razorExceptions (if any)
None. Browser console looks clean.
.NET Version
7.0.100-rc.1.22429.3
Anything else?
If you navigate internally, like to the Counter page first and then back to Home, then changing the address bar does trigger the confirm dialog.
External links, like an anchor tag pointing to blazor.net on the home page, also successfully get interrupted.
Repros with both Edge and Chrome.