title: How to refresh codemirror when it's parent div style becomes display block?
body: <p>I'm using codemirror with textareas in a tabbed interface, when i'm not in the tab that contains codemirror and then go to it, I get empty white space without line numbers or the cursor, when I refresh the page it works, I know it's because the tabs content is hidden using <code>display: none;</code> so how can I fix this issue ?</p>
  
  <p>here's my code, (I'm also using jquery):</p>
  
  <pre><code>var editor = CodeMirror.fromTextArea(document.getElementById($this.attr('id')), {
          lineNumbers: true,
          mode: text/html,
          enterMode: "keep",
          tabMode: "shift"
      });
  
      $(editor.getScrollerElement()).width(300);
      width = $(editor.getScrollerElement()).parent().width();
      $(editor.getScrollerElement()).width(width);
      editor.refresh();
  </code></pre>
  
  <p>thanks in advance.</p>