actually focus code after import

This commit is contained in:
tophf 2017-11-15 08:15:06 +03:00
parent fc5c00e37d
commit 9868a1819c

View File

@ -1411,7 +1411,7 @@ function addSections(sections, onAdded = () => {}) {
function maybeFocusFirstCM() { function maybeFocusFirstCM() {
const isPageLocked = document.documentElement.style.pointerEvents; const isPageLocked = document.documentElement.style.pointerEvents;
if (divs[0] && (isPageLocked ? index === sections.length : index === 0)) { if (divs[0] && (isPageLocked ? divs.length === sections.length : index === 0)) {
makeSectionVisible(divs[0].CodeMirror); makeSectionVisible(divs[0].CodeMirror);
divs[0].CodeMirror.focus(); divs[0].CodeMirror.focus();
} }