React.js controlled text cursor focus issue
问题 I have a simple controlled input of type number like below. <input type="number" value={+value} step={1} onChange={this.updateMyChange} /> My value often returns a decimal number like 123.123 . My problem is, when I try edit the value. The cursor loses focus and shifts to the beginning ignoring the whole numbers as soon as the decimal places are cleared. Like below: How do I address this? Immediately after the decimal places are cleared, the cursor jumps to the beginning thereby making it