From 8ae8ffeb2bbb709c6e1b4a24bb1b2a98f3003d66 Mon Sep 17 00:00:00 2001 From: void Date: Tue, 2 Feb 2021 19:34:58 +0000 Subject: [PATCH] =?UTF-8?q?editor:=20arreglar=20selecci=C3=B3n=20cuando=20?= =?UTF-8?q?no=20hay=20nada=20en=20el=20editor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit esto se rompiĆ³ en 8887932beee6b106855b520f2645ebf36d80e371 --- app/assets/javascripts/02-editor.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/assets/javascripts/02-editor.js b/app/assets/javascripts/02-editor.js index 79d09f96..2227c60b 100644 --- a/app/assets/javascripts/02-editor.js +++ b/app/assets/javascripts/02-editor.js @@ -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) } } }