Issue metadata
Sign in to add a comment
|
input[type=number] admitting letter E
Reported by
cabord...@gmail.com,
Mar 1 2016
|
||||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/48.0.2564.116 Safari/537.36 Example URL: https://jsfiddle.net/dt16mcfz/ Steps to reproduce the problem: 1. Use the URL provided What is the expected behavior? Not allowing letters - Showing an empty input if value is given in html - Ignoring the pressed keyboard key if it is not a number What went wrong? The letter "e" is showing and also admitted Does it occur on multiple sites: Yes Is it a problem with a plugin? No Did this work before? N/A Does this work in other browsers? Yes Chrome version: 48.0.2564.116 Channel: n/a OS Version: 6.1 (Windows 7, Windows Server 2008 R2) Flash Version: Shockwave Flash 20.0 r0 System language is Spanish(Spain, international)
,
Mar 1 2016
I think this is spec-behavior, weirdly enough. https://www.w3.org/TR/html5/forms.html#number-state-(type=number): > User agents must not allow the user to set the value to a non-empty string that is not a valid floating-point number. https://www.w3.org/TR/html5/infrastructure.html#valid-floating-point-number > A string is a valid floating-point number if it consists of: Optionally: Either a "e" (U+0065) character or a "E" (U+0045) character. Optionally, a "-" (U+002D) character or "+" (U+002B) character. A series of one or more ASCII digits.
,
Mar 2 2016
|
|||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||
Comment 1 by dtapu...@chromium.org
, Mar 1 2016