From 9868a1819c01541f7652bfb4e303256636f9a7d1 Mon Sep 17 00:00:00 2001 From: tophf Date: Wed, 15 Nov 2017 08:15:06 +0300 Subject: [PATCH] actually focus code after import --- edit/edit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/edit/edit.js b/edit/edit.js index 4fda7cff..d2ee8097 100644 --- a/edit/edit.js +++ b/edit/edit.js @@ -1411,7 +1411,7 @@ function addSections(sections, onAdded = () => {}) { function maybeFocusFirstCM() { 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); divs[0].CodeMirror.focus(); }