Re: <input type="number"> restricting user input to only valid characters

On 6/20/09, Michael A. Puls II <shadow2531@gmail.com> wrote:

> It seems like if the keypress is not one of "-+.e0123456789"
> (or "," instead of "." depending on the locale), then the keypress should
> be prevented.

that would not seem to be very useful for people who use IMEs or on
devices like mobile handsets with 12-key keypads instead of keyboards.
on my mobile, with a japanese IME, I have a few different choices for
typing in numbers; one of them is that I can press the あ/1 key
multiple times to cycle through choices, then press a second,
different key to confirm when  I've gotten to the number.

anyway, I realize the IME case is mostly like the paste case you
memtioned, but regardless, it would not seem prudent for the spec to
make any assumptions at all about what keys users should be pressing
to get a particular type of data into a particular input field. users
should be free to choose whatever way they want.

Received on Monday, 22 June 2009 08:58:50 UTC