JSFiddle - React, Tailwind, and code Playground
HTML
<input type="text" readonly value="blah">
JavaScript
$('input').on('click', function(e) {
var that = $(this);
setTimeout(function(){
that.select();
}, 100);
});
<input type="text" readonly value="blah">
$('input').on('click', function(e) {
var that = $(this);
setTimeout(function(){
that.select();
}, 100);
});