Timeline for Why does the HTML input with type "number" allow the letter 'e' to be entered in the field?
Current License: CC BY-SA 4.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 25, 2023 at 12:32 | comment | added | Tomas Katz | isnt there a built in configuration so disable this? no one eve uses "e" amazing how they preffered user experience of a few over the majority | |
Nov 25, 2020 at 9:28 | comment | added | simpsons3 |
@GTSJoe, you need to add 107 and 109 too, its + , - on numpad :D
|
|
Aug 2, 2020 at 16:28 | comment | added | GTS Joe | đź‘Ť Final code: onkeydown="return event.keyCode !== 69 && event.keyCode !== 187 && event.keyCode !== 189" That prevents e, + and -. | |
Jul 20, 2020 at 11:16 | comment | added | yasarui | @user1063287, this is the only exception in the case | |
Jul 20, 2020 at 8:50 | comment | added | user1063287 |
are there any other instances similar to e or E that non-mathematicians might not be aware of that could be added to this conditional check?
|
|
Sep 5, 2019 at 14:10 | comment | added | molamk |
This does not prevent copy-pasting e or E in the field though
|
|
Mar 4, 2019 at 9:54 | history | edited | yasarui | CC BY-SA 4.0 |
deleted 1 character in body
|
Mar 4, 2019 at 6:41 | history | edited | yasarui | CC BY-SA 4.0 |
added 272 characters in body
|
Jan 31, 2018 at 21:26 | comment | added | Adam Fratino |
Better to use return event.keyCode !== 69 as it avoids an unnecessary ternary operator. Also wouldn't recommend inlining.
|
|
Sep 26, 2017 at 8:10 | history | answered | yasarui | CC BY-SA 3.0 |