Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem fixedDecimalScale #797

Open
2 tasks done
yury-github opened this issue Sep 18, 2023 · 1 comment
Open
2 tasks done

Problem fixedDecimalScale #797

yury-github opened this issue Sep 18, 2023 · 1 comment

Comments

@yury-github
Copy link

yury-github commented Sep 18, 2023

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

  • Chrome (Android)
  • Huawei browser
@yury-github
Copy link
Author

yury-github commented Sep 18, 2023

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щ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant