JSFiddle - React, Tailwind, and code Playground
by Mottie
HTML
<input type="number" value="99">
JavaScript
document.getElementsByTagName('input')[0].onchange = function(){
this.type = "text";
console.log( this.selectionStart, this.selectionEnd );
this.type = "number";
};