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

RESOLVED DUPLICATE of bug 844744

Status

()

Core
DOM: Core & HTML
RESOLVED DUPLICATE of bug 844744
5 years ago
5 years ago

People

(Reporter: B.J. Herbison, Unassigned)

Tracking

Trunk
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

5 years ago
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
Last Resolved: 5 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 844744
You need to log in before you can comment on or make changes to this bug.