JSFiddle - React, Tailwind, and code Playground

HTML

<input type="text" value="click me to autoselect"/>

JavaScript

$('input[type="text"]').live('focus', function() {
    var inp = this;
    setTimeout(function() {
        inp.select();
    }, 1);
});