mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 05:01:41 +00:00
editor: arreglar selección cuando no hay nada en el editor
esto se rompió en 8887932bee
This commit is contained in:
parent
0c844a5c94
commit
8ae8ffeb2b
1 changed files with 2 additions and 0 deletions
|
@ -282,6 +282,8 @@ function cleanContent (contentEl) {
|
||||||
const el = document.createElement("p")
|
const el = document.createElement("p")
|
||||||
contentEl.insertBefore(el, child.nextSibling)
|
contentEl.insertBefore(el, child.nextSibling)
|
||||||
el.appendChild(child)
|
el.appendChild(child)
|
||||||
|
|
||||||
|
sel.collapse(el, el.textContent.length)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue