JSFiddle - React, Tailwind, and code Playground

HTML

<textarea></textarea>

JavaScript

$('textarea').bind('mouseup',function(){
        if(this.style.width != this.outerWidth || this.style.height != this.outerHeight){
            $(this).resize();
            this.outerWidth  = this.style.width;
            this.outerHeight = this.style.height;
        }
    });