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

Ashley Sheridan ash at ashleysheridan.co.uk
Mon Nov 1 00:57:50 PDT 2010


On Mon, 2010-11-01 at 06:15 +0200, timeless wrote:

> 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

That's a javascript event, and shouldn't be relied upon for this sort of
thing really.

> 
> >   "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.



Thanks,
Ash
http://www.ashleysheridan.co.uk


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.whatwg.org/pipermail/whatwg-whatwg.org/attachments/20101101/8cc541d9/attachment-0001.htm>


More information about the whatwg mailing list