Bug 91889
Summary: | <input type='range'> with decimal step size can have inaccurate decimal values | ||
---|---|---|---|
Product: | WebKit | Reporter: | Pawel Chomicki <pchomicki> |
Component: | Forms | Assignee: | 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
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Kent Tamura
Not reproducible with Google Chrome 23.0.1239.0 canary.
Probably this was already fixed.