New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 734335 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

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.
 
test_input_number.html
160 bytes View Download
Labels: Needs-Milestone
Cc: msrchandra@chromium.org
Labels: Needs-Feedback
@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.

Comment 3 by ni...@adorilabs.com, Jun 23 2017

I would like to confirm that I observe the same behavior in Firefox 54.0 (32 bit) 
Thank You.
Project Member

Comment 4 by sheriffbot@chromium.org, Jun 23 2017

Labels: -Needs-Feedback
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
Components: Blink>HTML
Labels: Needs-Feedback
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.

Comment 6 by tkent@chromium.org, Jun 30 2017

Components: -UI -Blink>HTML Blink>Forms>Number
Owner: tkent@chromium.org
Status: WontFix (was: Unconfirmed)
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