JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" value="wow" id="my_input" />
JavaScript
$("#my_input").focus(function(){
$(this).select();
}).mouseup(function(){return false;});
<input type="text" value="wow" id="my_input" />
$("#my_input").focus(function(){
$(this).select();
}).mouseup(function(){return false;});