HtmlEditor focusing first in Dialog

Hi Radzen team,

I've encountered an issue with how focus is handled in dialogs. From what I understand, the dialog should automatically focus the first focusable element, which works as expected in some cases, but not in others.

For example, with this setup:

<RadzenTextBox />
<RadzenHtmlEditor />

The focus correctly goes to the RadzenTextBox when the dialog opens.

However, when wrapping the components in RadzenFormField like so:

<RadzenFormField Text="TextBox">
  <RadzenTextBox />
</RadzenFormField>
<RadzenFormField Text="Html">
  <RadzenHtmlEditor />
</RadzenFormField>

The dialog consistently focuses the RadzenHtmlEditor, even if it appears after the RadzenTextBox. This behavior isn't ideal, as it should prioritize the first focusable element regardless of layout wrappers.

Is there any chance this could be addressed in a future update?

I'm still new to Blazor and not quite ready to submit pull requests myself, but I wanted to bring this to your attention.

Thanks for your time and for all your work on Radzen!

It also seems like if there are multiple components before the HtmlEditor and one of the components before the HtmlEditor is focused that on pressing enter it instantly jumps to the HtmlEditor instead of to the next component :thinking:

I'm unable to replicate such problem on our demos:


Yes. It works fine if you only use the TextBox and the HtmlEditor, but if you wrap both in a FormField like in my example it doesn't do what is expected.

Here is an example on your Demo Page which does only focus the HtmlEditor:


Thank you for checking this issue