JSFiddle - React, Tailwind, and code Playground

HTML

<div id="ContentDiv">
    <input type="text" value="default" />
</div>

JavaScript

$(document).ready(initialize);

function initialize() {
    var tmp;
    $("#ContentDiv").on({
        focus: function (e) {
            //select for all browsers
            $(this).select();
            tmp = true;
        },
        mouseup: function (e) {
            //reselect for IE10
            if (tmp) {
                this.select();
                tmp = false;
            }
            //chrome still needs this
            e.preventDefault();
        }
    }, "input:text");
}