mirror of
https://github.com/penpot/penpot.git
synced 2025-07-18 10:17:13 +02:00
🐛 Fix text editor issues
This commit is contained in:
parent
59e5656bd7
commit
59ca09c24e
3 changed files with 34 additions and 6 deletions
|
@ -223,7 +223,9 @@ export class TextEditor extends EventTarget {
|
|||
* @param {FocusEvent} e
|
||||
*/
|
||||
#onFocus = (e) => {
|
||||
this.#selectionController.restoreSelection();
|
||||
if (!this.#selectionController.restoreSelection()) {
|
||||
this.selectAll();
|
||||
}
|
||||
if (this.#selectionImposterElement) {
|
||||
this.#selectionImposterElement.replaceChildren();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue