W3C home > Mailing lists > Public > whatwg@whatwg.org > October 2010

[whatwg] <input type=number> without keyboard editing

From: timeless <timeless@gmail.com>
Date: Mon, 1 Nov 2010 06:15:43 +0200
Message-ID: <AANLkTi=KfU0pHZ8i=d2W+ywX87fKpdSgTmu63zxHKu4T@mail.gmail.com>
On Mon, Nov 1, 2010 at 4:31 AM, TAMURA, Kent <tkent at chromium.org> wrote:
> A team in Google tried to use <input type=number> for a product, and they
> decided
> not to use it.

> What they needed was a control to select an integer from a specific integer
> range
> such as 1 - 16. The number type control in Opera and WebKit allow a user to
> input
> out-of-range value even if the control has min=1 and max=16 attributes.

> It's not
> a good UI and the reason why they doesn't use type=number.

> They need a number control which
> ?- doesn't allow any keyboard / cut&paste operations and
> ? So, a text field part is read-only, but the spin-buttons work.

Not allowing cut isn't really reasonable. If you want to prevent cut
from working completely, that's fine.
i.e. when i cut "15" (because i use cut instead of copy consistently),
then your web application is free to reset the value to the default,
but "15" should go into my clipboard.

When I select paste to restore my "15", it needs to work. You don't
have the right to mess with that.

> ?- always has a valid value.

set one in onchange

> ? "required" by default, and sanitization algorithm may be different.

> I'm not sure how to solve this issue. ?Introducing new content attribute or
> another number type?

No.
Received on Sunday, 31 October 2010 21:15:43 UTC

This archive was generated by hypermail 2.3.1 : Monday, 13 April 2015 23:09:01 UTC