JSFiddle - React, Tailwind, and code Playground
HTML
<input id="selectMe" value="123" /><input type="button" id="focusHim" value="Im working fine" />
JavaScript
$('#selectMe').on("click", function() {
this.select();
});
$('#focusHim').click( function() {
$('#selectMe').focus();
});