W3C home > Mailing lists > Public > whatwg@whatwg.org > April 2011

[whatwg] Decimal comma in numeric input

From: Jukka K. Korpela <jkorpela@cs.tut.fi>
Date: Sat, 16 Apr 2011 16:18:34 +0300
Message-ID: <8CFF6A701CDC4DFBA6A67EE979FA01BC@JukanPC>
Aryeh Gregor wrote:

> I didn't read the whole thread, but: authors with specific needs will
> always want to roll their own inputs for most of these things, and
> that's fine.

An element for user input of a real number in a format that uses a suitable 
decimal separator is hardly a "specific need". By "suitable" I mean that the 
separator corresponds to the user's preferences _or_ the conventions of the 
(main) language of the page - it is not clear which one should be used, but 
using either a full stop in all cases (against the rules of most languages 
of the world) or an unpredictable separator is hardly suitable.

> Trying to add more features to the
> new form stuff is premature when we only have one really good
> implementation (IMO: Gecko's), and that implementation is partial.

This is not about "more features". This is about the implementations, and 
implementability, of the feature <input type="number">.

Is rather about "less features". Maybe <input type="number"> should be 
restricted to integer input only, on the ground that useful features with 
fairly straightforward implementability should be added, without waiting for 
clarification of issues related possible extended formats of the features.

It might even be a good idea to add an element for real number input later 
as, say, <input type="real"> rather than allowing <input type="number"> to 
accept real numbers. This would allow e.g. an implementation to provide a 
virtual keyboard for <input type="number"> with only digits, "+" sign, and 
"-" sign, making it clearer that only whole numbers are expected.

-- 
Yucca, http://www.cs.tut.fi/~jkorpela/ 
Received on Saturday, 16 April 2011 06:18:34 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:03 GMT