Closed
Bug 1415513
Opened 9 years ago
Closed 3 years ago
Value of input tag is not equal to entered value
Categories
(Core :: Layout: Form Controls, defect, P3)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: kostya1917, Unassigned)
Details
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:56.0) Gecko/20100101 Firefox/56.0
Build ID: 20171003101214
Steps to reproduce:
Firefox allows use dot or comma to separate decimal figure in input field with number type.
Actual results:
See here http://jsbin.com/fukuhudafo/1/edit?html,js,console,output
For example:
1. Enter 1.333 figure and see console output (1.333)
2. Enter 1,333 figure and see console output (1333 - without separator dot or comma)
If you set lang attribute to another language this behavior would be changed for dot and comma.
Expected results:
Must be correct value and don't depend on separator (dot or comma).
| Reporter | ||
Updated•9 years ago
|
Summary: Value of input tag is not equal entered value → Value of input tag is not equal to entered value
Updated•9 years ago
|
Component: Untriaged → Layout: Form Controls
Product: Firefox → Core
Updated•9 years ago
|
Priority: -- → P3
Updated•4 years ago
|
Severity: normal → S3
Comment 1•3 years ago
|
||
It doesn't appear that commas are allowed here by the spec.
Per §4.10.5.1.12 Input element - Number state:
The
valueattribute, if specified and not empty, must have a value that is a valid floating-point number.
Per §2.3.4.3 Floating-point numbers:
A string is a valid floating-point number if it consists of:
- Optionally, a U+002D HYPHEN-MINUS character (-).
- One or both of the following, in the given order:
- A series of one or more ASCII digits.
- Both of the following, in the given order:
- A single U+002E FULL STOP character (.).
- A series of one or more ASCII digits.
- Optionally:
- Either a U+0065 LATIN SMALL LETTER E character (e) or a U+0045 LATIN CAPITAL LETTER E character (E).
- Optionally, a U+002D HYPHEN-MINUS character (-) or U+002B PLUS SIGN character (+).
- A series of one or more ASCII digits.
Per spec, an invalid floating-point number in the value field should produce an empty string, which it didn't according to the original bug report but it does as of 119, so I think we can close this?
Flags: needinfo?(emilio)
Comment 2•3 years ago
|
||
Yeah would be good to find when this was fixed.
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
Flags: needinfo?(emilio)
Resolution: --- → WORKSFORME
Comment 3•3 years ago
|
||
:emilio I got you: Bug 1509057
Narrowed to this Nightly range with mozregression and grepped for input, based on the test change in the patch I'm pretty sure this is the one.
You need to log in
before you can comment on or make changes to this bug.
Description
•