Ion-input type="number" bug, "e"


Why does “e” keyboard input work if type is specified as number?
Works for both lowercase and uppercase.
Is this a bug?

<ion-input type=“number” placeholder=“Number”">


I believe this is so that you can enter numbers in scientific notation (e.g. 1.234e6 to signify 1 234 000). There does not seem to be an option to enter this from a mobile keyboard though…


Makes sense, thanks!

A little frustrating if you’re just expecting numerical notation for entering something like an ID number, that only 0-9 should be allowed.

Is there a way to prevent that e from sneaking in?


I guess You can use tel type to show only 0-9


type=“tel” allows the entire character input from the keyboard in the simulator, not just “e”.

What I have found though is that when you set type=“number”, testing on Android physical device, by default you’re given a numeric keyboard only for input, you’d have to go the extra mile to change to the general character keyboard.

It might be the same for setting type=“tel” but i haven’t tested that. Think it should suffice to make an app “dummy proof”/Instruction-less.

Thanks for the feedback.


I used type=“tel” but its still allowing me to enter “e”. Please advise!! I used pattern too but it won’t work.