Closed
Bug 1010184
Opened 11 years ago
Closed 9 years ago
Use exponent notation for small values of input type "number"
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 1005603
People
(Reporter: johannes.postler, Unassigned)
References
()
Details
(Keywords: testcase)
Attachments
(1 file, 1 obsolete file)
72.72 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:29.0) Gecko/20100101 Firefox/29.0 (Beta/Release)
Build ID: 20140506152807
Steps to reproduce:
I'm using HTML5 input fields of the type "number" to display small floating point numbers like so:
<input id="id_pressure_tof" name="pressure_tof" step="any" type="number" value="1.3e-07" />
Actual results:
Firefox displays the number as 0 (without any decimals)
Expected results:
Firefox should display 1.3e-7 (or 0.00000013 alternatively). Chrome (and IE!) does it right - screenshot attached.
Comment 1•11 years ago
|
||
This seems to work on 30b with the following testcase: http://jsbin.com/pefow/1/edit
Can you confirm that this was fixed since Firefox 29? :-)
Component: Untriaged → DOM: Core & HTML
Flags: needinfo?(johannes.postler)
Keywords: testcase
OS: Windows 7 → All
Product: Firefox → Core
Hardware: x86_64 → All
Reporter | ||
Comment 2•11 years ago
|
||
Indeed, your testcase goes wrong in 29.1.
I had a look at my problem with 30b3 and it seems to be fine.
Flags: needinfo?(johannes.postler)
Reporter | ||
Comment 3•11 years ago
|
||
However, it displays 0.0000024 instead of 2.4e-6, which is not very readable...
Comment 4•11 years ago
|
||
The rounding was fixed in bug 1004327. I'm morphing this to be about the display of small values.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Summary: Input type "number" doesn't display small float numbers correctly → Use exponent notation for small values of input type "number"
Reporter | ||
Comment 5•10 years ago
|
||
Still valid as of the newest 35.0 release.
Version: 29 Branch → 35 Branch
Comment 6•9 years ago
|
||
Updated•9 years ago
|
Attachment #8661188 -
Attachment mime type: text/plain → text/html
Updated•9 years ago
|
Attachment #8661188 -
Attachment is obsolete: true
Comment 7•9 years ago
|
||
Comment 4 essentially morphed this bug into a duplicate of bug 1005603. I have noticed a related issue when it comes to stepping the value of number inputs, but rather than morph this bug again I've opened bug 1205060 and I'll close this one as a duplicate of bug 1005603.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•