Skip to content
Bug reportOct 13, 2026· 0:31· 0 views

CKEditor 5: Bold toolbar button shows active+disabled state when cursor enters a code block

0:31 total

Comments · 0

Be the first to comment.

Bug report— by SceneRecap AI

lowtoolbar
os: macOSbrowser: Chromium 151.0.7922.34viewport: 1280x720

Repro steps

  1. 1.Navigate to the CKEditor 5 Code blocks documentation demo
  2. 2.Enter text in the editor and click the 'Bold' toolbar button to apply bold formatting
  3. 3.Click the 'Insert code block' button on the editor toolbar to convert the content into a code block
  4. 4.Inspect the state of the 'Bold' button in the toolbar with the cursor positioned inside the code block

Expected

When the selection is inside a code block where rich text formatting is unavailable, the Bold button should be rendered inactive and disabled.

Actual

The Bold button retains its active light-blue background styling while simultaneously being rendered in a disabled state.

Evidence

visualControl case working: At t=11.0s, the Bold button correctly displays in the standard active and enabled state when editing paragraph text.
visualFailing case: At t=13.0s and t=19.0s, after converting the block to a code block, the Bold button toolbar item displays conflicting active (light blue background) and disabled (faded icon) states.
consoleConsole warning logged: 'Bold button not found'
Issue markdown (copy-paste ready)
### Summary
When formatting text with bold and then converting the block into a code block, the 'Bold' toolbar button remains visually highlighted as active while simultaneously being disabled.

### Steps to Reproduce
1. Open the CKEditor 5 Code blocks demo (`/docs/ckeditor5/latest/features/code-blocks.html`) (t=0.0s).
2. In the demo editor, toggle bold formatting on text using the 'Bold' toolbar button (t=7.6s).
3. Click the 'Insert code block' button to wrap the content in a code block (t=12.0s).
4. Observe the 'Bold' toolbar button state while the cursor is inside the code block (t=13.0s–19.0s).

### Expected Result
Because code blocks do not support inline formatting, the Bold toolbar button should reset to an inactive state while disabled.

### Actual Result
The Bold button shows an active light-blue highlight background together with disabled styling.

### Evidence
- **Frame 11.0s (Control)**: Regular paragraph text successfully toggles the Bold button to an enabled, active state.
- **Frame 13.0s & Frame 19.0s**: Upon inserting the code block, the Bold toolbar button retains the active background highlight while the icon is disabled.
- **Console (16.0s)**: Warning `Bold button not found` emitted.

*Recorded with SceneRecap.*

Your recordings could explain themselves too.

Free plan · silent recordings welcome · bug reports included.

Try SceneRecap free →
CKEditor 5: Bold toolbar button shows active+disabled state when cursor enters a code block · SceneRecap