title: Synchronizing span and textarea scrollbars - scrollbar slightly off and pasting issue
body: <p>I have a table set up in the following way, with each cell containing a span and a textarea:    </p>
  
  <pre><code>&lt;table&gt;
     &lt;tr&gt;&lt;td class="title"&gt;Original File&lt;/td&gt;&lt;/tr&gt;
     &lt;tr&gt;&lt;td&gt;&lt;span id='ogline' onscroll="og.scrollTop=scrollTop"&gt;&lt;/span&gt;&lt;span&gt;&lt;textarea onscroll="ogline.scrollTop=scrollTop" onkeyup="linenumber()" id='og' onfocusout="linenumber()"&gt;&lt;/textarea&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>Along with that I have the following CSS:</p>
  
  <pre><code>&lt;style&gt;
  span {
    width:93%;
    height: 100%;
  }
  textarea {
    width:92%;
    height: 100%;
    border-style:solid;
    border-color:black;
    border-width:2px;
    font-size:13px;
  }
  table {
    width:100%;
    height:100%;
  }
  .title {
    height:5%;
    text-align:center;
    background-color:#009;
    color:white;
  }
  #ogline {
    padding-top:4px;
    overflow:auto;
    font-size:12px;
    line-height:14.99px;
    width:6%;
  }
  &lt;/style&gt;
  </code></pre>
  
  <p>What I am trying to do is have the scroll bar of the span and the scroll bar of the textarea synch up. I've somewhat accomplished this using the onscroll event listener with the following code:</p>
  
  <pre><code>onscroll="og.scrollTop=scrollTop"
  onscroll="ogline.scrollTop = scrollTop
  </code></pre>
  
  <p>This has somewhat accomplished what I want it to, with the span being about a line off of where it should be. The greatest problem I am having though is when I paste a large amount of text into the textarea. This almost completely doesn't work, with both scrollbars being completely off until I hold one of the scrollbars down for a significant amount of time before the other scrollbar will try to play catch up with the other.</p>
  
  <p>Any suggestions? Is there maybe a better approach to this issue that I should try? Any help would be appreciated.</p>