Input field type=number using a comma as decimal point is empty says Chrome

1,881 views
Skip to first unread message

Andreas Bjørn Hassing Nielsen

unread,
Jun 6, 2014, 5:38:48 PM6/6/14
to chromi...@chromium.org
So recently one of my apps has had some problems on Chrome.

The app has an input field that is using the HTML5 type=numberEnter
I have a jQuery script in place, that takes care of validation, in case the user enters a comma to separate decimals from the initial integer (most users are Danish, and in Denmark, ',' is used instead of '.'). Previously the script would look at the value of the input field on form submit, but as of the latest version of chrome, this script yields "" (empty string) when called on a field containing a number separated from its decimals by a comma:
$('#input_field_using_number').val(); // = "", should be = "2,5" (example)

I'm parsing novalidate="novalidate" to the form, as chrome will freak out if commas are used in number fields, and I don't want to get in my users face about it, and would rather just fix it for them, before posting the data. Chrome is now breaking this (all other browsers are fine).

What should I do? Any workaround, or am I in the hands of Google, or have to force my users to use the dot, although they are used to using the comma?

Thank you,
/Andreas

PhistucK

unread,
Jun 6, 2014, 5:55:28 PM6/6/14
to Andreas Bjørn Hassing Nielsen, Chromium Apps
If this happens when the regional settings of your operating system is set to a country for which , represents a decimal mark, Chrome does not seem to support the localized way of representing float values (and thinks it is not a number) and then crbug.com/178437 kicks in...


I guess you should file an issue (if you cannot find one) at crbug.com for the lack of localization support for float values.


PhistucK


--
You received this message because you are subscribed to the Google Groups "Chromium Apps" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-app...@chromium.org.
To post to this group, send email to chromi...@chromium.org.
Visit this group at http://groups.google.com/a/chromium.org/group/chromium-apps/.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.

Reply all
Reply to author
Forward
0 new messages