-
-
Notifications
You must be signed in to change notification settings - Fork 383
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
Comma decimal separator fails validation in amount inputs #2954
Comma decimal separator fails validation in amount inputs #2954
Comments
spotted by @Betree while reviewing opencollective/opencollective-frontend#3613 |
Initially, I had a look around and I came across this blog post on how However, I was able to reproduce the error behaviour you pointed out in Firefox 73 and Safari 13. And when I added a lang attribute (Norwegian for example) to the input element in components/InputField.js But the error behaviour still persisted in the other browsers I had tried previously. We could try adding lang attributes that would allow commas&periods to the input fields based on the currency set, however, behaviour across browsers may not be consistent. |
@znarf also shared something on this topic the other day: https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/. There are two things here:
It probably won't be perfect, but even just relying on the native
So for me the two things that we need to do here are:
|
This also happens when submitting an expense. |
This is still happening with expenses. We need to have a look at this. |
Describe the bug
Using a comma as a decimal separator in currency fields doesn't work properly. Depending on browser typing a comma into a currency field either removes the whole value being typed or outright doesn't print the comma into the input.
To Reproduce
Expected behaviour
Comma accepted/saved as decimal separator
Additional context
In many regions, commas are used as decimal separators in money values.
The text was updated successfully, but these errors were encountered: