title: Jumping Scrollbar after auto-expanding textarea
body: <p>I have an auto-expanding textarea.  When pasting extremely long text (longer than window height), subsequent typing causes the browser scrollbar to jump.  This happens when trying to type at the bottom, because the document height is also growing.  </p>
  
  <p>Ideas, anyone?</p>
  
  <p>Codepen:  <a href="https://codepen.io/btn-ninja/pen/bRVKYe" rel="nofollow noreferrer">https://codepen.io/btn-ninja/pen/bRVKYe</a> </p>
  
  <pre><code>function growTextarea (i,elem) {
      var elem = $(elem);
      var offset = elem.prop('offsetHeight') - elem.prop('clientHeight');
       var resizeTextarea = function( elem ) {
          elem.css('height', 'auto').css('height', elem.prop('scrollHeight') + offset );            
      };
      elem.on('input', function() {
          resizeTextarea( $(this) );
      });
      resizeTextarea( $(elem) );
  }
  
  $('.jTextarea').each(growTextarea);
  </code></pre>