JSFiddle - React, Tailwind, and code Playground

HTML

<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
<input id="clickme" type="text" value="Some Text"/>

JavaScript

$('#clickme').select();

$('#clickme').on('mousedown', function(e) {
	e = e || window.event;
  e.preventDefault();
  $(this).select();
});