The issue can be reproduced when clicking on a button that opens a predefined Dialog, then making some changes on the page and hot reloading. In this scenario, I get the following error:
Microsoft.JSInterop.JSException: Cannot read properties of null (reading 'addEventListener') TypeError: Cannot read properties of null (reading 'addEventListener')
Hi Stefan,
There’s another item under your name on our public feedback portal that’s currently marked as Unplanned. It actually seems to be the one most relevant to your case. Please take a look at it and follow the thread there for future updates: https://feedback.telerik.com/blazor/1682454-predefined-dialogs-are-not-shown-after-hot-reload-updates-are-applied
Let me know if I’ve misunderstood anything.
Regards,
Hristian Stefanov
Progress Telerik
One year later we are still seeing this after Hot Reload with .NET 9 and Telerik UI for Blazor 9.1.1
crit: Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100]
Unhandled exception rendering component: Cannot read properties of null (reading 'dataset')
TypeError: Cannot read properties of null (reading 'dataset')
at new r (http://localhost:5079/_content/Telerik.UI.for.Blazor/js/telerik-blazor.js:1:1022483)
at e.initComponent (http://localhost:5079/_content/Telerik.UI.for.Blazor/js/telerik-blazor.js:23:2512410)
at e.initDialog (http://localhost:5079/_content/Telerik.UI.for.Blazor/js/telerik-blazor.js:23:1684607)
at http://localhost:5079/_framework/blazor.webassembly.js:1:2900
at new Promise (<anonymous>)
at v.beginInvokeJSFromDotNet (http://localhost:5079/_framework/blazor.webassembly.js:1:2857)
at Object.Zt [as invokeJSJson] (http://localhost:5079/_framework/blazor.webassembly.js:1:56051)
at http://localhost:5079/_framework/dotnet.runtime.ew19f13umk.js:3:33879
at Fc (http://localhost:5079/_framework/dotnet.runtime.ew19f13umk.js:3:172343)
at wasm://wasm/00b5ba72:wasm-function[288]:0x1f1e1
Original issue: Blazor WASM breaks in VS2022 after Hot Reload in UI for Blazor | Telerik Forums