JSFiddle - React, Tailwind, and code Playground

HTML

<div>
  <div>
    <br><br> &nbsp;&nbsp;
    <textarea class="normal" name="myarea" id="myarea" style="height: 100px; overflow-y: hidden;"></textarea>
  </div>
</div>

CSS

textarea {
  max-height: 85vh;
}

JavaScript

var myquery = {
  autoHeight: function(e) {
    $(e).css({
      'height': 'auto',
      'overflow-y': 'hidden'
    }).height(e.scrollHeight);
  },
  init: function() {
    setTimeout(function() {
      $('textarea').each(function() {
        myquery.autoHeight(this);
      }).on('input', function() {
        myquery.autoHeight(this);
      });
    }, 200);
    $("textarea").keypress(function(e) {
       $(this).focus();    
    });
  }

};

$(myquery.init);