input[type=number] showing incorrect results when step is an integer and value is a float
Reported by
ni...@adorilabs.com,
Jun 17 2017
|
|||||
Issue description
UserAgent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36
Steps to reproduce the problem:
<!DOCTYPE html>
<html>
<body>
<input type="number"
min="0.00"
max="10.00"
step="1.00"
value="2.01">
</body>
</html>
https://plnkr.co/edit/dcjYLmp6J7w944gRBLPv
What is the expected behavior?
When "up-button" is clicked Value should be 3.01
When "down-button" is clicked Value should be 1.01
What went wrong?
When "up-button" is clicked Value is 3
When "down-button" is clicked Value is 2
Did this work before? No
Chrome version: 58.0.3029.110 Channel: n/a
OS Version: 6.1 (Windows 7, Windows Server 2008 R2)
Flash Version:
It is possible that the spec is not clear. But isn't this an expected behavior. Please take a lead on this and fix it. The specs of my project requires user to change the step size.
,
Jun 22 2017
@niyer@adorilabs -- Thank You for the bug report. Downloaded the attachment and loaded in Chrome# 59.0.3071.109 and observed the values as 3 and 2 when up and down button were clicked accordingly. Observed the same behavior in Firefox, could you please verify on Firefox and let us know the behavior. Thanks in Advance.
,
Jun 23 2017
I would like to confirm that I observe the same behavior in Firefox 54.0 (32 bit) Thank You.
,
Jun 23 2017
Thank you for providing more feedback. Adding requester "msrchandra@chromium.org" to the cc list and removing "Needs-Feedback" label. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Jun 27 2017
Can someone from dev team please look into this issue as the behavior is same on Chrome and Firefox, which would help us to triage the issue further. Thanks.
,
Jun 30 2017
This is by design. Because min=0.00 and step=1.00, neither of 1.01, 2.01, nor 3.01 is valid value. The stepper buttons try to make the value valid. |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by ranjitkan@chromium.org
, Jun 19 2017