[whatwg] Decimal comma in numeric input
Jukka K. Korpela
jkorpela at cs.tut.fi
Sat Apr 16 06:18:34 PDT 2011
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/
More information about the whatwg
mailing list