diff --git a/edit/sections.js b/edit/sections.js index 5e6f8715..c5380303 100644 --- a/edit/sections.js +++ b/edit/sections.js @@ -455,6 +455,9 @@ function removeAreaAndSetDirty(area) { } function makeSectionVisible(cm) { + if (editors.length === 1) { + return; + } const section = cm.getSection(); const bounds = section.getBoundingClientRect(); if ( diff --git a/edit/source-editor.js b/edit/source-editor.js index f9139be1..4be93c9e 100644 --- a/edit/source-editor.js +++ b/edit/source-editor.js @@ -146,6 +146,8 @@ function createSourceEditor(style) { CodeMirror.commands.nextEditor = cm => nextPrevMozDocument(cm, 1); CodeMirror.commands.toggleStyle = toggleStyle; CodeMirror.commands.save = save; + + CodeMirror.closestVisible = () => cm; } function updateMeta() {