Declare DialogService rendermode to InteractiveServer turn pure html element to VirtualDom?

Dear all,

I working on .NET 10 application using Radzen latest version 11.2.6, which run as InteractiveServer mode.

Inside the MainLayout.razor:

<RadzenComponents @rendermode="InteractiveServer" />

I occur a strange issue about DialogService, if I set the DialogService rendermode to InteractiveServer explicitly,

<RadzenDialog @rendermode="RenderMode.InteractiveServer" />

I found that all pure html element will render as virtual dom, eventully the javascript can’t be manipulate with the element (get value, addEventListener etc).

But if i remove the @rendermode="RenderMode.InteractiveServer" or just remove the whole tag, the side dialog and javascript are works,

@inherits LayoutComponentBase

<RadzenComponents @rendermode="InteractiveServer" />
<RadzenDialog @rendermode="RenderMode.InteractiveServer" />
@* Remove @rendermode="RenderMode.InteractiveServer" or whole RadzenDialog tag, the button click will work.*@
@Body
  1. The page and components stay InteractiveServer mode
  2. The pure html element stay untouch.

My question is, for best practice, is it necessary place a on layout file?
and Radzen make pure html element turn to VDom, does this behavior is by design or kind of bug?

I had push the source code to bitbucket -

Thanks you

I’ve run into similar behavior when mixing render modes and JavaScript DOM manipulation. I’d be careful about calling this a “virtual DOM” though. Blazor is maintaining its own render tree, and direct JS changes to elements owned by an interactive component can get overwritten.

If RadzenComponents is already interactive through the layout, I’d first try leaving RadzenDialog without its own @rendermode. Having a second interactive boundary there seems more likely to cause the conflict. It would be interesting to see whether the same thing happens with a plain Blazor component instead of RadzenDialog.

I would update my post,

remove the @rendermoderendermode="RenderMode.InteractiveServer" won’t help,

I have to remove the whole RadzenDialog tag to make it works.

RadzenComponents already outputs a RadzenDialog of its own. This is why our getting starated instructions mention to use RadzenComponents.