Open lassopicasso opened 1 year ago
Looks like this has just been fixed and a new version has been released: https://github.com/s-yadav/react-number-format/releases/tag/v5.2.0
I have updated the React Number Format NPM package within @digdir/designsystem
. My changes should be included in the next release of @digdir/designsystem.
Changes: https://github.com/digdir/designsystem/pull/413
cc: @lassopicasso
Well done! 💯
Description of the bug
Input that uses formatting (React Number Format) breaks the pointer/marker behavior when it contains suffix with more than one character and decimal separator.
When enter the dot-key (as decimal separator) in input field, the pointer/marker will focus infront of decimal separator. So if user keeps writing, the decimal separator disappears. In other words, user has to change the focus of pointer/marker after enter decimal.
This problem occurred after the release of version 5 of RNF. This hopefully solves in next update of React Number Format. Then maybe add some extra tests with numbers containing decimals in e2e formatting.ts.
It has already been created an issue for this to the react-number-format team: https://github.com/s-yadav/react-number-format/issues/725
Steps To Reproduce
Additional Information
https://github.com/Altinn/app-frontend-react/pull/1132 No response