Focus first editor on init. Fixes #605

This commit is contained in:
Rob Garrison 2018-12-08 07:51:09 -06:00
parent 8a3c260eb9
commit 68ce3a653e

View File

@ -436,7 +436,7 @@ function createSectionsEditor({style, onTitleChanged}) {
if (!originalSections.length) {
setGlobalProgress();
if (focusOn !== false) {
sections[focusOn].cm.focus();
setTimeout(() => sections[focusOn].cm.focus());
}
container.classList.remove('hidden');
for (const section of sections) {