Issue 158652 in chromium: The maxlength attribute on textarea is not accurately counting newline characters

87 views
Skip to first unread message

chro...@googlecode.com

unread,
Oct 30, 2012, 9:00:16 PM10/30/12
to chromi...@chromium.org
Status: Unconfirmed
Owner: ----
Labels: Webkit-JavaScript Pri-2 Via-Wizard Type-Bug OS-Windows

New issue 158652 by styfle...@gmail.com: The maxlength attribute on
textarea is not accurately counting newline characters
http://code.google.com/p/chromium/issues/detail?id=158652

UserAgent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.4 (KHTML, like
Gecko) Chrome/22.0.1229.94 Safari/537.4

Steps to reproduce the problem:
1. Visit my jsFiddle: http://jsfiddle.net/Qw6vz/1/
2. Begin typing in the textarea (maxlength=200)
3. Note the character counter

What is the expected behavior?
Should be able to max out the 200 character limit specified by maxlength
attribute on textarea.

What went wrong?
Less than 200 characters are permitted in the textarea due to the way
newlines are counted (2 characters instead of 1).

Note: If you type text without newlines, you can hit the maxlength as
expected

Did this work before? N/A

Chrome version: 22.0.1229.94 Channel: stable
OS Version: 5.1 (Windows XP)

I thought it was just a Windows bug but it shows up on Fedora 15 too.

It works fine in Firefox and Safari so this is a Chrome specific bug.

chro...@googlecode.com

unread,
Nov 2, 2012, 6:08:27 AM11/2/12
to chromi...@chromium.org
Updates:
Status: Untriaged
Cc: msrchan...@chromium.org

Comment #1 on issue 158652 by msrchan...@chromium.org: The maxlength
attribute on textarea is not accurately counting newline characters
http://code.google.com/p/chromium/issues/detail?id=158652

This issue is reproducible. Verified on M21 build.

This issue is not a Regression issue.

Steps: Navigate to the URL.
Enter text in the right side space provided.
The characters count is accepted till 197 or 198.

Expected Result: Total 200 characters should be able to enter by the user.

Thanks,
Ravi


chro...@googlecode.com

unread,
Nov 2, 2012, 2:04:03 PM11/2/12
to chromi...@chromium.org
Updates:
Labels: Mstone-23

Comment #2 on issue 158652 by ligim...@chromium.org: The maxlength
attribute on textarea is not accurately counting newline characters
http://code.google.com/p/chromium/issues/detail?id=158652

(No comment was entered for this change.)

chro...@googlecode.com

unread,
Mar 13, 2015, 6:03:53 AM3/13/15
to chromi...@chromium.org

Comment #7 on issue 158652 by habl...@chromium.org: The maxlength attribute
on textarea is not accurately counting newline characters
https://code.google.com/p/chromium/issues/detail?id=158652#c7

[Automated message] This issue does not seem to be a V8 issue. The label
Cr-Blink-JavaScript will be removed next week. The label Cr-Blink will be
added instead. If you think that this issue is correctly labeled as a V8
issue please contact hablich@.

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

chro...@googlecode.com

unread,
Mar 28, 2015, 5:57:21 PM3/28/15
to chromi...@chromium.org
Updates:
Cc: abhijee...@samsung.com

Comment #9 on issue 158652 by abhijee...@samsung.com: The maxlength
attribute on textarea is not accurately counting newline characters
https://code.google.com/p/chromium/issues/detail?id=158652

(No comment was entered for this change.)

Reply all
Reply to author
Forward
0 new messages