Editor focus happens when clicking outside the editor


As shown in the video, when I click on a region outside the editor area, the editor comes into focus. Is this something that is intentionally desired? How do I cancel it?


This is a weird thing Chrome does and not something CodeMirror is involved in or can do much about.

.cm-editor {
  display: inline-block !important; // or inline-flex
  width: 100%

It works for me.