Skip to content
Permalink
Browse files

editor: rollback auto-focusing behavior of editors, since it causes i…

…ssues on page load in embeds with scroll
  • Loading branch information...
thesephist committed Jun 12, 2019
1 parent 3ac9c4b commit 4894aacc9447364024070d7490ef3c853f9adf66
Showing with 0 additions and 10 deletions.
  1. +0 −10 static/js/main.js
@@ -349,12 +349,6 @@ class MonacoEditor {
});
this.setMode(this.mode);

//> When the editor loads, bring the focus to it unless there is another
// element with focus.
if (document.activeElement === null || document.activeElement === document.body) {
this.monacoEditor.focus();
}

callback(this);
});
}
@@ -521,10 +515,6 @@ class CodeMirrorEditor {
// This seems like a poorly documented behavior of CM.
this.setMode(this.mode);

if (document.activeElement === null || document.activeElement === document.body) {
this.codeMirrorEditor.focus();
}

callback(this);
}

0 comments on commit 4894aac

Please sign in to comment.
You can’t perform that action at this time.