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

[whatwg] Constraint validation feedback (various threads)

From: Jonas Sicking <jonas@sicking.cc>
Date: Fri, 25 Mar 2011 14:53:43 -0700
Message-ID: <AANLkTi=DAyfEPS0N=Q1tCw6YPCyvmB=X4nnwfkN8WacW@mail.gmail.com>
On Wed, Mar 23, 2011 at 8:18 PM, TAMURA, Kent <tkent at chromium.org> wrote:
>> Ok. It seems the best solution is to just remove the "suffering from being
>> too long" state and simply require that authors not let authors enter
>> values longer than the maxlength. Right?
>
>
> I agree removing tooLong validity.
>
> Google Chrome 10 has the interactive validation, and is causing some
> compatibility issues about maxlength.
> http://www.google.com/support/forum/p/Chrome/thread?tid=4f612fe2abafc365&hl=en

I don't think we should remove the tooLong validity check. We've been
discussing fixing the horrible UI that browsers currently use when
maxlength is in effect.

The problem is that for something like <input name=tweet
maxlength=140> browsers currently prevent you from ever entering more
than 140 characters. This is terrible UI since it means that if you
are half way through a sentence when you reach 140 characters, you
have to abort your current train of thought, go edit the existing text
to make it shorter, go back to the end to keep writing until you reach
140 characters again, rinse, repeat.

This is why sites like twitter end up not using maxlength and instead
use javascript to implement what they need.

To address this problem we're planning on making Firefox allow the
user to type more than maxlength number of characters, but make the
field invalid when that happens. Making it invalid will change the UI
as well as prevent submission.

/ Jonas
Received on Friday, 25 March 2011 14:53:43 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:31 UTC