JSFiddle - React, Tailwind, and code Playground
HTML
<input id="search" type="text" value="mycurrtext" size="30" name="search"/>
JavaScript
$("input").focus(function () {
var val = this.value;
var $this = $(this);
$this.val("");
setTimeout(function () {
$this.val(val);
}, 1);
});