react-number-format icon indicating copy to clipboard operation
react-number-format copied to clipboard

Problem fixedDecimalScale

Open yury-github opened this issue 1 year ago • 1 comments

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.

number-format

Please check the browsers where the issue is seen

  • [x] Chrome (Android)
  • [x] Huawei browser

yury-github avatar Sep 18 '23 14:09 yury-github

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(); } photщ

yury-github avatar Sep 18 '23 15:09 yury-github