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.