mirror of
https://github.com/penpot/penpot.git
synced 2025-05-24 21:16:11 +02:00
🐛 Fix selectAll when editor is empty
This commit is contained in:
parent
30a06249ff
commit
7101b94557
1 changed files with 3 additions and 0 deletions
|
@ -479,6 +479,9 @@ export class SelectionController extends EventTarget {
|
||||||
* Selects all content.
|
* Selects all content.
|
||||||
*/
|
*/
|
||||||
selectAll() {
|
selectAll() {
|
||||||
|
if (this.#textEditor.isEmpty) {
|
||||||
|
return this
|
||||||
|
}
|
||||||
this.#selection.selectAllChildren(this.#textEditor.root);
|
this.#selection.selectAllChildren(this.#textEditor.root);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue