JSFiddle - React, Tailwind, and code Playground
HTML
<input id="test" value="abc" />
JavaScript
onload = function() {
var input = document.getElementById("test");
input.onfocus = function() {
setTimeout(function() {
input.setSelectionRange(0, 0);
}, 0);
};
};