From cd091d2e30904111d8215b435bbb57f27fb8085f Mon Sep 17 00:00:00 2001 From: void Date: Tue, 2 Feb 2021 20:13:50 +0000 Subject: [PATCH] =?UTF-8?q?editor:=20arreglar=20otra=20vez=20la=20selecci?= =?UTF-8?q?=C3=B3n=20en=20un=20documento=20vacio?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/javascript/editor/editor.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/javascript/editor/editor.js b/app/javascript/editor/editor.js index a52f9c8e..75749623 100644 --- a/app/javascript/editor/editor.js +++ b/app/javascript/editor/editor.js @@ -275,7 +275,8 @@ const cleanContent = (contentEl) => { contentEl.insertBefore(el, child.nextSibling) el.appendChild(child) - sel.collapse(el, el.textContent.length) + sel.selectAllChildren(contentEl) + sel.collapseToEnd() } } }