HtmlEditor errors on StateHasChanged #109

Closed
opened 2026-01-29 17:31:42 +00:00 by claunia · 2 comments
Owner

Originally created by @ParkerRedford on GitHub (Jun 6, 2021).

I want to add some fancy features on my page, but it requires StateHasChanged. However, the RadzenHtmlEditor component keeps erroring out with "Cannot set property 'innerHTML' of null

Error: Microsoft.JSInterop.JSException: Cannot set property 'innerHTML' of null
TypeError: Cannot set property 'innerHTML' of null
at Object.innerHTML (https://localhost:44388/script/Radzen.Blazor.js:950:21)
at https://localhost:44388/_framework/blazor.server.js:1:70368
at new Promise ()
at e.beginInvokeJSFromDotNet (https://localhost:44388/_framework/blazor.server.js:1:70334)
at https://localhost:44388/_framework/blazor.server.js:1:26441
at Array.forEach ()
at e.invokeClientMethod (https://localhost:44388/_framework/blazor.server.js:1:26411)
at e.processIncomingData (https://localhost:44388/_framework/blazor.server.js:1:24222)
at e.connection.onreceive (https://localhost:44388/_framework/blazor.server.js:1:17307)
at WebSocket.i.onmessage (https://localhost:44388/_framework/blazor.server.js:1:46783)
at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
at Radzen.Blazor.RadzenHtmlEditor.OnAfterRenderAsync(Boolean firstRender)
at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)

Originally created by @ParkerRedford on GitHub (Jun 6, 2021). I want to add some fancy features on my page, but it requires StateHasChanged. However, the RadzenHtmlEditor component keeps erroring out with "Cannot set property 'innerHTML' of null Error: Microsoft.JSInterop.JSException: Cannot set property 'innerHTML' of null TypeError: Cannot set property 'innerHTML' of null at Object.innerHTML (https://localhost:44388/script/Radzen.Blazor.js:950:21) at https://localhost:44388/_framework/blazor.server.js:1:70368 at new Promise (<anonymous>) at e.beginInvokeJSFromDotNet (https://localhost:44388/_framework/blazor.server.js:1:70334) at https://localhost:44388/_framework/blazor.server.js:1:26441 at Array.forEach (<anonymous>) at e.invokeClientMethod (https://localhost:44388/_framework/blazor.server.js:1:26411) at e.processIncomingData (https://localhost:44388/_framework/blazor.server.js:1:24222) at e.connection.onreceive (https://localhost:44388/_framework/blazor.server.js:1:17307) at WebSocket.i.onmessage (https://localhost:44388/_framework/blazor.server.js:1:46783) at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args) at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args) at Radzen.Blazor.RadzenHtmlEditor.OnAfterRenderAsync(Boolean firstRender) at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle)
Author
Owner

@akorchev commented on GitHub (Jun 7, 2021):

We will need a reproduction of this issue.

@akorchev commented on GitHub (Jun 7, 2021): We will need a reproduction of this issue.
Author
Owner

@ParkerRedford commented on GitHub (Jun 7, 2021):

I could not reproduce the issue, but I ended up fixing the issue by removing protected override async Task OnParametersSetAsync() in my project

@ParkerRedford commented on GitHub (Jun 7, 2021): I could not reproduce the issue, but I ended up fixing the issue by removing protected override async Task OnParametersSetAsync() in my project
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#109