Closed danroth27 closed 1 year ago
This is happening because the Blazor Server navigation manager is overriding the one for endpoints RemoteNavigationManager
Are you sure? It doesn't look like there even is a Blazor Server navigation manager in this case.
I think what's happening is that DispatchCapturedEvent
runs at the wrong time, for two reasons:
try
/catch(NavigationException)
hence the immediate problem herequiesceTask
to an incomplete task. This means the renderer goes into the streaming SSR code paths even if streaming SSR is not enabled, which would be a bug.Instead I think DispatchCapturedEvent
should be triggered inside EndpointHtmlRenderer
's RenderEndpointComponent
, right after await WaitForResultReady
. At this point, the outer code doesn't yet consider the renderer quiescent, so DispatchCapturedEvent
is free to add other async work which will be considered part of the initial page render (without causing streaming SSR to start), plus it will automatically be inside the existing catch
for NavigationException
so that would just work.
@javiercn @SteveSandersonMS Are there any workarounds for this issue with the current bits?
Repro steps:
Expected result: Form is submitted and app navigates to the counter page Actual result: