[Webkit-unassigned] [Bug 54443] Textarea maxlength doesn't account for newlines

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 14 01:54:49 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=54443





--- Comment #15 from Naoki Takano <takano.naoki at gmail.com>  2011-03-14 01:54:49 PST ---
I see.

I didn't consider such a situation. Actually this is not only new line problem, but also normal characters.

Let's say,
 <input type="text" value="aaaaaaa" maxlength="3">
It shows
aaaaaaa
in text input.

I suppose it might be different problem form the bug entry pointed out though, because the reporter only told "new line" though.
Anyway, I'll look into it more.

Thanks,

(In reply to comment #14)
> (In reply to comment #13)
> > Thank you for your review.
> > 
> > But I cannot understand what is "open typing command".
> 
> TypingCommand can be open or closed.  Open means that TypingCommand is still accepting more inputs.  This is necessary to group together multiple input events so that we can undo them at once.
> 
> > Could you tell me what kind of situation it happens?
> 
> In your patch, you're fixing only when you're adding more inputs to the existing TyingCommand (the last one on the undo stack).  But you don't fix the case where there is no typing command or the TypingCommand which is on the top of the undo stack has already been closed (e.g. by selection change).  So try inserting a line break into <input type="text" value="\n\n\n" maxlength="3">.  I bet your fix won't work in this case.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list