mirror of
https://github.com/penpot/penpot.git
synced 2025-12-12 06:24:17 +01:00
🐛 Fix selectAll when editor is empty
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user