JSFiddle - React, Tailwind, and code Playground
HTML
<textarea readonly="readonly" rows="3" cols="20">This is my text.</textarea>
JavaScript
$('textarea').focus(function(e) {
e.target.select();
$(e.target).one('mouseup', function(e) {
e.preventDefault();
});
});