react-currency-input-field
react-currency-input-field copied to clipboard
fr-CA locale causes cursor and currency sign to jump around
Describe the bug
fr-CA
is Canadian French and when used as the locale for the intlConfig
prop, it should use a comma to separate the dollar and cents. Also the dollar sign should be a suffix on the far right. But when deleting digits and adding the comma, the cursor and the dollar sign will jump around unexpectedly.
To Reproduce Steps to reproduce the behavior:
- Go to https://codesandbox.io/s/agitated-mcclintock-0vg43l?file=/src/App.js
- Click on the input at the end, to the right of the dollar sign
- Press backspace, the cursor doesn't move
- Try clicking to the right of the cents (i.e. the 0 digit) and backspacing a couple times
Expected behavior Backspacing in the input should delete digits and keep the currency sign to the right at all times. Should be able to enter a comma to separate dollars and cents and be able to enter said dollars and cents without the currency sign jumping around.
Code Sandbox https://codesandbox.io/s/agitated-mcclintock-0vg43l?file=/src/App.js