RadzenListBox triggers NullReferenceException on browser autofill

Hi Radzen team,

I’m seeing a reproducible NullReferenceException in a Blazor Server app when using browser autofill on any RadzenTextBox, as long as the page also contains a RadzenListBox.

Steps to reproduce

  1. Open a form/page that contains at least:

    • two RadzenTextBox (any field)

    • one RadzenListBox

  2. Click into the RadzenTextBox.

  3. Use browser autofill (saved value) to populate the textboxes.

  4. The app throws an exception and the circuit breaks.

Observed error (client console)
blazor.server.js:1 Error: System.NullReferenceException: Object reference not set to an instance of an object.
at Radzen.DropDownBase1.HandleKeyPress(KeyboardEventArgs args, Boolean isFilter, Nullable1 shouldSelectOnChange)
at Radzen.DropDownBase1.OnKeyPress(KeyboardEventArgs args, Nullable1 shouldSelectOnChange)
at Radzen.Blazor.RadzenListBox`1.OnKeyDown(KeyboardEventArgs args)
at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)

Notes

  • If I comment out the RadzenListBox, autofill works without any error.

  • The ListBox Data is not null and contains no null items (I also tried passing a filtered “safe” list) — no change.

Question
Is this a known issue with RadzenListBox/DropDownBase keyboard handling triggered by browser autofill? Has anyone a solution?

Thanks!

Such issue was never reported before however this should help:

The fix will be released by the end of the week.

1 Like