5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-06-02 08:54:16 +00:00

editor: arreglar selección cuando no hay nada en el editor

esto se rompió en 8887932bee
This commit is contained in:
void 2021-02-02 19:34:58 +00:00
parent 0c844a5c94
commit 8ae8ffeb2b

View file

@ -282,6 +282,8 @@ function cleanContent (contentEl) {
const el = document.createElement("p")
contentEl.insertBefore(el, child.nextSibling)
el.appendChild(child)
sel.collapse(el, el.textContent.length)
}
}
}