Bug 91889

Summary: <input type='range'> with decimal step size can have inaccurate decimal values
Product: WebKit Reporter: Pawel Chomicki <pchomicki>
Component: FormsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED WORKSFORME    
Severity: Normal CC: dev, gmak, tkent, tonikitoo
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
URL: http://jsfiddle.net/njMhg/

Pawel Chomicki
Reported 2012-07-20 12:04:21 PDT
For example, range input has value 30.740000000000002 instead of the expected 30.74. Test code pasted below, or available here: http://jsfiddle.net/njMhg/ <html> <body> <input type="range" min="0" max="50" value="0" step="0.01" onchange="showValue(this.value)" /> <span id="range">0</span> <script type="text/javascript"> function showValue(newValue) { document.getElementById("range").innerHTML=newValue; } </script> </body> </html>​
Attachments
Kent Tamura
Comment 1 2012-08-18 17:23:33 PDT
Not reproducible with Google Chrome 23.0.1239.0 canary. Probably this was already fixed.
Note You need to log in before you can comment on or make changes to this bug.