autofocus when add/clone button is clicked

This commit is contained in:
tophf 2020-10-10 00:20:21 +03:00
parent 37c0768125
commit a8248bd829

View File

@ -562,6 +562,7 @@ function createSectionsEditor({style, onTitleChanged}) {
const index = sections.indexOf(base);
sections.splice(index + 1, 0, section);
container.insertBefore(section.el, base.el.nextSibling);
section.cm.focus();
} else {
sections.push(section);
container.appendChild(section.el);