Bug: must enable redo to enable undo (toolbar items)

Hi


This works:

<RichTextEditorToolbarSettings Items="RTE_TOOLBAR_ITEMS" />

...
static readonly List<ToolbarItemModel> RTE_TOOLBAR_ITEMS = new()
{
...
    new ToolbarItemModel() { Command = ToolbarCommand.Undo },
new ToolbarItemModel() { Command = ToolbarCommand.Redo }
}

But this does not work:

<RichTextEditorToolbarSettings Items="RTE_TOOLBAR_ITEMS" />

...
static readonly List<ToolbarItemModel> RTE_TOOLBAR_ITEMS = new()
{
...
    new ToolbarItemModel() { Command = ToolbarCommand.Undo }
}


Blazor throws the following error in the browser console:

System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
   at Syncfusion.Blazor.Navigations.SfToolbar.EnableItems(List`1 items, Nullable`1 isEnable)
   at Syncfusion.Blazor.RichTextEditor.Internal.Toolbar.EnableItems(List`1 itemData, Boolean enable)
   at Syncfusion.Blazor.RichTextEditor.Internal.Toolbar.Created()
   at Microsoft.AspNetCore.Components.ComponentBase.CallStateHasChangedOnAsyncCompletion(Task task)
   at Syncfusion.Blazor.Internal.SfBaseUtils.InvokeEvent[T](Object eventFn, T eventArgs)
   at Syncfusion.Blazor.Navigations.SfToolbar.OnAfterScriptRendered()
   at Syncfusion.Blazor.SfBaseComponent.OnAfterRenderAsync(Boolean firstRender)
   at Syncfusion.Blazor.Navigations.SfToolbar.OnAfterRenderAsync(Boolean firstRender)
   at Microsoft.AspNetCore.Components.RenderTree.Renderer.GetErrorHandledTask(Task taskToHandle, ComponentState owningComponentState)


Hope you can fix it!



4 Replies

BS Buvana Sathasivam Syncfusion Team January 24, 2022 12:51 PM UTC

Hi Jacob, 

Greetings from Syncfusion support. 

We have considered the issue “A script error is thrown when using either of the two Undo or Redo toolbar items” as a bug from our end and the fix for the issue will be included with our upcoming weekly patch release on February 1, 2022. 

You can now track the current status of the report, review the proposed resolution timeline, and contact us for any further inquiries through this link:  

Regards, 
Buvana S 



BS Buvana Sathasivam Syncfusion Team February 1, 2022 06:14 PM UTC

We are facing complexity in resolving the reported issue in our end. We will include the fix in the upcoming patch release which is expected to be rolled out on February 09, 2022. 



BS Buvana Sathasivam Syncfusion Team February 10, 2022 01:38 PM UTC

Hi Jacob, 

Sorry for the inconvenience. 

We are facing complexity to resolve the issue. We will include the fix in February 16, 2022 patch release. We appreciate your patience until then. 

Regards, 
Buvana S 



BS Buvana Sathasivam Syncfusion Team February 16, 2022 06:08 PM UTC

Hi Jacob, 

Thank you for your patience. 

We are glad to announce that fix for the issue “A script error is thrown when using either of the two Undo or Redo toolbar items" has been rolled out in our weekly patch release. We request you to upgrade the package to “19.4.50” version to get rid of this issue. Please find the sample below.  


Regards, 
Buvana S 


Loader.
Up arrow icon