diff --git a/frontend/text-editor/src/editor/controllers/SelectionController.js b/frontend/text-editor/src/editor/controllers/SelectionController.js index 11cca7c1b..0f2aeed07 100644 --- a/frontend/text-editor/src/editor/controllers/SelectionController.js +++ b/frontend/text-editor/src/editor/controllers/SelectionController.js @@ -479,6 +479,9 @@ export class SelectionController extends EventTarget { * Selects all content. */ selectAll() { + if (this.#textEditor.isEmpty) { + return this + } this.#selection.selectAllChildren(this.#textEditor.root); return this; }