Skip to content

Render Mode Auto Interactive does not wait for next access of a component before swapping to WASM #52899

Closed as not planned
@CaveRock

Description

@CaveRock

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

RenderMode Auto does not wait to replace Server Interactive mode with WasmInteractive until next use of component, it does it as soon as wasm has downloaded. Any user interaction with the component, like entering text into an input element, is wiped when the component is replaced while user is still interacting with the component.

Expected Behavior

The expected behavior is that the component will load initially as server interactive and then stay as server interactive until the next time the component is used.

Steps To Reproduce

Set component to use RenderMode Auto, for example an Input Form.
Set browser dev tools to replicate 3g connection in order to see the issue more easily.
Run Application.
Click Form Problem Nav Link.
Cntrl F5 to hard refresh to ensure Server Interactive mode initially.
On first load of the input form component it will load as server interactive as expected, however, as soon as WASM has downloaded the component is swapped out immediately.
User can type into the Input Form while it is Server Interactive, but the component will be completely replaced as soon as WASM version of component is available, this wipes all user input from the form.

Attached video of the issue demonstrated with a Form

localhost_7030_formproblem.-.Profile.1.-.Microsoft.Edge.2023-12-19.14-46-12.mp4

Repo to reproduce

Additional example with different behavior can be seen with Counter component in the linked repo.

Cntrl F5 refresh while on the Counter component, attempt to interact with Click Me button.
There will be no increment until the Server Interactive version of the component has been replaced with the wasm component, this replacement will happen without having to navigate away from the component.

Exceptions (if any)

No response

.NET Version

8

Anything else?

No response

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions