New issue
Advanced search Search tips

Issue 591060 link

Starred by 2 users

Issue metadata

Status: Duplicate
Merged: issue 365196
Owner:
Closed: Mar 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

input[type=number] admitting letter E

Reported by cabord...@gmail.com, Mar 1 2016

Issue description

UserAgent: 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)
 
bug.png
62.9 KB View Download
Components: -Blink Blink>Forms
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.

Comment 3 by tkent@chromium.org, Mar 2 2016

Components: -Blink>Forms Blink>Forms>Number
Mergedinto: 365196
Owner: tkent@chromium.org
Status: Duplicate (was: Unconfirmed)

Sign in to add a comment