radzenhq / radzen-blazor

Radzen Blazor is a set of 90+ free native Blazor UI components packed with DataGrid, Scheduler, Charts and robust theming including Material design and FluentUI.
https://www.radzen.com
MIT License
3.52k stars 785 forks source link

HtmlEditor errors on StateHasChanged #130

Closed ParkerRedford closed 3 years ago

ParkerRedford commented 3 years ago

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)

akorchev commented 3 years ago

We will need a reproduction of this issue.

ParkerRedford commented 3 years ago

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