This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 27594 - Initial value in an example is 50 (not 60)
Summary: Initial value in an example is 50 (not 60)
Status: RESOLVED INVALID
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec (show other bugs)
Version: unspecified
Hardware: PC Windows NT
: P2 editorial
Target Milestone: ---
Assignee: This bug has no owner yet - up for the taking
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-12 10:44 UTC by Róbert Mareček
Modified: 2015-07-08 15:06 UTC (History)
4 users (show)

See Also:


Attachments

Description Róbert Mareček 2014-12-12 10:44:22 UTC
"For example, the markup <input type="range" min=0 max=100 step=20 value=50> results in a range control whose initial value is 60."
Comment 1 Philippe Le Hegaret 2015-07-08 15:06:34 UTC
Actually, the spec is correct:

[[
When the element is suffering from a step mismatch, the user agent must round the element's value to the nearest number for which the element would not suffer from a step mismatch, and which is greater than or equal to the minimum, and, if the maximum is not less than the minimum, which is less than or equal to the maximum, if there is a number that matches these constraints. If two numbers match these constraints, then user agents must use the one nearest to positive infinity.

For example, the markup <input type="range" min=0 max=100 step=20 value=50> results in a range control whose initial value is 60.
]]

50 is a step mismatch. It could be rounded to 40 and 60, and 60 is the one nearest to positive infinity.