New issue
Advanced search Search tips

Issue 592448 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

Line break and characters count while copy-pasting in a maxlength field

Reported by miclo.th...@gmail.com, Mar 7 2016

Issue description

Chrome Version       : 	48.0.2564.116 (Official Build) m (32-bit)

What steps will reproduce the problem?
1. Open test.html which has a maxlength="200"
2. try to past this text:
"För att ta dig till Saltoluokta med kollektivtrafik tar du tåg eller flyg till Gällivare, därefter buss 93 mot Ritsem. Kliv av i Kebnats, därefter båt på sommaren eller markerad isled på vintern.

Sommar"
It is 205 characters (counting line breaks) so it gets shortened.
3. Try to submit the form

What is the expected result?
Since if I remove a character, I cannot write more, I think the expected result is that it should be shortened the same way characters are counted on form submit/textarea change.

What happens instead?
It must be counting the Javascript basic way textareaValue.length so it allows me to copy-paste more than I should be able to do.

Other browsers tested:
    Firefox: Stops me at 202 characters but doesn't care at submit anyway
       EDGE: Same
 
test.html
143 bytes View Download
Components: Blink>DataTransfer
Components: Blink>Forms

Comment 3 by tkent@chromium.org, Mar 31 2016

Components: -Blink>DataTransfer -Blink>Forms Blink>Forms>Textarea Blink>Forms>Maxlength
Labels: -Pri-3 OS-All Pri-2
Status: Available (was: Unconfirmed)
maxlength doesn't restrict textarea.value.length, but form submitted value length.  So, the validation message is correct.  The cutting behavior on paste looks to have a bug.

Comment 4 by tkent@chromium.org, Apr 1 2016

Owner: tkent@chromium.org
Status: Started (was: Available)

Comment 6 by tkent@chromium.org, Apr 1 2016

Labels: M-51
Status: Fixed (was: Started)

Sign in to add a comment