[Webkit-unassigned] [Bug 150704] Setting input[type=range].value = NaN causes slider to go to 50%

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Nov 2 16:02:43 PST 2015


https://bugs.webkit.org/show_bug.cgi?id=150704

zalan <zalan at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zalan at apple.com
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from zalan <zalan at apple.com> ---
This is the expected behavior:
http://www.w3.org/TR/html5/forms.html#range-state-(type=range)

"The value attribute, if specified, must have a value that is a valid floating-point number.

The value sanitization algorithm is as follows: If the value of the element is not a valid floating-point number, then set it to a valid floating-point number that represents the default value.
...
The default value is the minimum plus half the difference between the minimum and the maximum, unless the maximum is less than the minimum, in which case the default value is the minimum."

Both FireFox and Chrome agree.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20151103/eaa6bd8a/attachment.html>


More information about the webkit-unassigned mailing list