Closed Bug 953338 Opened 11 years ago Closed 10 years ago

<input type=number> appears to accept comma separated numbers, but doesn't really

Categories

(Core :: DOM: Core & HTML, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 844744

People

(Reporter: bj, Unassigned)

Details

Steps to reproduce:
1) Open an HTML file containing just '<input type="number">'.
2) Enter "1.1" in the field and click outside the field.
3) Enter "1,000" in the field and click outside the field.
4) Click the up-arrow on the field.

Expected:
2) Error indicated.
3) No error indicated.
4) "1,001" in the field.

Actual:
2) Error indicated.
3) No error indicated.
4) "1" in the field.

If commas as digit separators aren't supported there should be an error in step 3. If they are supported the up and down arrows should work correctly.

My strong preference is to support separators as that is the way people type long numbers. It seems unreasonable to say "you need to convert your number to a hard-to-read string of digits to enter it.

Don't assume commas are used to separate every three digits, some traditions use four digits between commas. (<https://en.wikipedia.org/wiki/Decimal_mark#Digit_grouping>)

This, of course, interacts with using comma as a decimal separator for other locales. (Bug 949074 and probably others.)
Thanks for the bug report. You basically want a fix for bug 844744, so duping thing bug to that one.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.