title: Why Codemirror editor does NOT scroll horizontally with long line?
body: <p>I've a code mirror version: 5.65.3 with Blazor. When I've a long line in the editor the horizontal scroll doesn't work, it rather uses the scroll of the page which mess out the whole page.</p>
  <p>Like this:
  <a href="https://i.stack.imgur.com/44FTp.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/44FTp.gif" alt="enter image description here" /></a></p>
  <p>I don't think that I changed any CSS in Codemirror.</p>
  <p>Here is some related CSS lines:</p>
  <pre><code>    .CodeMirror {
    /* Set height, width, borders, and global font properties here */
    font-family: monospace;
    height: 750px;
    color: black;
    direction: ltr;
  
  }
  
  
  .CodeMirror-scroll {
    overflow: scroll !important; /* Things will break if this is overridden */
    /* 50px is the magic margin used to hide the element's real scrollbars */
    /* See overflow: hidden in .CodeMirror */
    margin-bottom: -50px; margin-right: -50px;
    padding-bottom: 50px;
    height: 100%;
    outline: none; /* Prevent dragging from highlighting the element */
    position: relative;
    z-index: 0;
  }
  </code></pre>
  <p>I'm calling the codemirror through this code: (the onchange is because I'm using Blazor for binding purposes )</p>
  <pre><code>window.editor= function (dontNetObjRef) {
  
      editor = CodeMirror.fromTextArea(document.getElementById('myTextArea'), {
          lineNumbers: true,
          indentUnit: 4,
          lineWrapping: true,
          tabMode: &quot;shift&quot;,
          gutters: [&quot;CodeMirror-lint-markers&quot;]
      });
  
      //JavaScript function use the onchange event of CodeMirror to invoke the C# method and pass the value of the myTextArea .
  
      editor.on(&quot;change&quot;, editor =&gt; {
          dontNetObjRef.invokeMethodAsync(&quot;UpdateField&quot;, editor.getValue());
          // console.log(editor.getValue());
  
      });
  </code></pre>
  <p>Note: even if I used <code>lineWrapping: true</code> it moved to the second line and does the same issue with scroll.
  Also, it works well when I set a fixed width like 1000px but I'd like to make it auto in case the screen size of the user changes.</p>