Element: [Bug Report] el-input bug,type="number",still can input char 'e'

Created on 24 May 2018  ·  4Comments  ·  Source: ElemeFE/element

Element UI version

2.3.9

OS/Browsers version

chrome 66.0.3359.181

Vue version

2.5.17-beta.0

Reproduction Link

https://jsfiddle.net/friskjt/6dunv01m/3/

Steps to reproduce

just input:111eee

What is Expected?

111

What is actually happening?

111eee

Most helpful comment

Should we perhaps reopen this? In native inputs, type="number" restricts characters: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number

All 4 comments

This is not a bug, native input also has the same behavior.

image

You can use InputNumber instead of it.

Should we perhaps reopen this? In native inputs, type="number" restricts characters: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number

@jikkai its input field with type "Number" and type of all values must be "Number"! User is not allowed to record into this field string and other text chars.

This is not a bug, native input also has the same behavior.
You can use InputNumber instead of it.

So in input-number cpmponent you mentioned, we can still type characters in that input 'number' field... Isn't it a bit wierd?

Was this page helpful?
0 / 5 - 0 ratings