diff --git a/frontend/text-editor/src/editor/controllers/SelectionController.js b/frontend/text-editor/src/editor/controllers/SelectionController.js index 4f8e49ca9..77cb109a9 100644 --- a/frontend/text-editor/src/editor/controllers/SelectionController.js +++ b/frontend/text-editor/src/editor/controllers/SelectionController.js @@ -358,6 +358,16 @@ export class SelectionController extends EventTarget { detail: this.#currentStyle, }) ); + } else { + const firstInline = this.#textEditor.root?.firstElementChild?.firstElementChild; + if (firstInline) { + this.#updateCurrentStyle(firstInline); + this.dispatchEvent( + new CustomEvent("stylechange", { + detail: this.#currentStyle, + }), + ); + } } }