New issue
Advanced search Search tips

Issue 624361 link

Starred by 9 users

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Bug



Sign in to add a comment

textarea[maxlength]: A linebreak should be counted as 1.

Project Member Reported by tkent@chromium.org, Jun 29 2016

Issue description

Behavior of <textarea maxlength=> in major browsers are not compatible.  We should resolve it.

See a specification issue for the detail: https://github.com/whatwg/html/issues/1467

 

Comment 1 by tkent@chromium.org, Jun 29 2016

Labels: Hotlist-Interop

Comment 3 by tkent@chromium.org, Jul 3 2016

Status: ExternalDependency (was: Available)

Comment 4 by tkent@chromium.org, Aug 26 2016

Status: Available (was: ExternalDependency)
The specification has been updated so that a single line break is counted as 1.
https://github.com/whatwg/html/commit/163703186794c21daa92cc2718218afa44f26071

We should do
 1. Wait until the counters of #2 become stable.  That is to say, M53 stable push.
 2. Create chromestatu.com entry
 3. If the counters are not ignorable, send an intent-to-ship to blink-dev.
 4. Change the behavior.

Comment 5 by tkent@chromium.org, Sep 28 2016

Owner: tkent@chromium.org
Status: Started (was: Available)
Summary: textarea[maxlength]: A linebreak should be counted as 1. (was: Resolve interoperability issue of textarea[maxlength])

Comment 6 by tkent@chromium.org, Sep 28 2016

Intent-to-ship was approved.

Project Member

Comment 7 by bugdroid1@chromium.org, Sep 28 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a15474ff7adff41a8956ab436ac63a7d5b7a090f

commit a15474ff7adff41a8956ab436ac63a7d5b7a090f
Author: tkent <tkent@chromium.org>
Date: Wed Sep 28 04:21:15 2016

Change the linebreak behavior of minlength and maxlength attributes of TEXTAREA.

Change it in response to a specification change, and to improve compatibility with
Firefox and Edge.

Old behavior:
 CRLF, CR, or LF is counted as 2 because we limited the submission value.

New behavior:
 CRLF, CR, or LF is counted as 1 because we limit the API value.

We can use HTMLTextAreaElement::value().length() as is because it's the API value,
and other string input should be counted by computeLengthForAPIValue().

Approved intent-to-ship:
https://groups.google.com/a/chromium.org/d/msg/blink-dev/MkSfvCan7kY/PgniO8jwAAAJ

BUG= 624361 

Review-Url: https://codereview.chromium.org/2380473002
Cr-Commit-Position: refs/heads/master@{#421445}

[modify] https://crrev.com/a15474ff7adff41a8956ab436ac63a7d5b7a090f/third_party/WebKit/LayoutTests/fast/forms/textarea/textarea-maxlength-expected.txt
[modify] https://crrev.com/a15474ff7adff41a8956ab436ac63a7d5b7a090f/third_party/WebKit/LayoutTests/fast/forms/textarea/textarea-maxlength.html
[modify] https://crrev.com/a15474ff7adff41a8956ab436ac63a7d5b7a090f/third_party/WebKit/LayoutTests/fast/forms/validationMessage-expected.txt
[modify] https://crrev.com/a15474ff7adff41a8956ab436ac63a7d5b7a090f/third_party/WebKit/Source/core/html/HTMLTextAreaElement.cpp
[modify] https://crrev.com/a15474ff7adff41a8956ab436ac63a7d5b7a090f/third_party/WebKit/Source/core/html/HTMLTextAreaElementTest.cpp

Comment 8 by tkent@chromium.org, Sep 28 2016

Labels: M-55
Status: Fixed (was: Started)
That's all which we can do.
WebKit and Edge violate the specification about non-BMP characters, but we can't do anything for them.

Sign in to add a comment