You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first hidden toolbar button gets removed, and (if possible) one of hidden buttons gets "promoted" to the toolbar button.
❌ Actual result
An error is thrown:
Uncaught CKEditorError: collection-remove-404: Item not found. Read more: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html#error-collection-remove-404
at ViewCollection._remove (http://localhost:8125/ckeditor5/tests/manual/all-features.js:143318:10)
at ViewCollection.remove (http://localhost:8125/ckeditor5/tests/manual/all-features.js:142909:32)
at ViewCollection.<anonymous> (http://localhost:8125/ckeditor5/tests/manual/all-features.js:138818:25)
at ViewCollection.fire (http://localhost:8125/ckeditor5/tests/manual/all-features.js:146827:30)
at ViewCollection._remove (http://localhost:8125/ckeditor5/tests/manual/all-features.js:143328:8)
at ViewCollection.remove (http://localhost:8125/ckeditor5/tests/manual/all-features.js:142909:32)
at <anonymous>:1:19
Other (ui): Improved toolbar rendering time when multiple items are added or removed at once (e.g. during editor initialization). Closes#6194.
Fix (ui): Removing the first hidden (grouped) toolbar button should not throw an exception. Closes#7655.
📝 Provide detailed reproduction steps (if any)
✔️ Expected result
The first hidden toolbar button gets removed, and (if possible) one of hidden buttons gets "promoted" to the toolbar button.
❌ Actual result
An error is thrown:
📃 Other details
That's a typical OBOE originating in this line:
ckeditor5/packages/ckeditor5-ui/src/toolbar/toolbarview.js
Line 567 in 8f3c81b
It's enough to change it to
if ( index >= this.ungroupedItems.length ) {
There's a similar situation with adding buttons
ckeditor5/packages/ckeditor5-ui/src/toolbar/toolbarview.js
Line 553 in 8f3c81b
_updateGrouping()
call that follows it cleans up the structure, and no problem is visible.If you'd like to see this fixed sooner, add a 👍 reaction to this post.
The text was updated successfully, but these errors were encountered: