react-number-format
react-number-format copied to clipboard
Problem fixedDecimalScale
Describe the issue and the actual behavior
Android version < 12, fixedDecimalScale === true
If the cursor is after decimalSeparator and Backspace is pressed, the value will be saved as a whole with values after decimalSeparator.
Please check the browsers where the issue is seen
- [x] Chrome (Android)
- [x] Huawei browser
in _onKeyDown get the event value and conditions do not work (key === 'Backspace') e.key === undefined e.code === '' e.keyCode === 229
if (key === 'Backspace' && value[selectionStart - 1] === decimalSeparator) { setCaretPosition(el, selectionStart - 1); e.preventDefault(); }