scottjehl / Device-Bugs

Just a collection of quirks and issues that occur on browser platforms (particularly those unlikely to update)
864 stars 19 forks source link

textarea maxlength inconsistent with new lines #73

Open zachleat opened 8 years ago

zachleat commented 8 years ago

<textarea maxlength="2">

image

One new line is allowed in Chrome and Safari, but two are allowed in Firefox, Edge, and IE.

Safari has another peculiar behavior in that it seems to round up (?) when new lines are in play. For example: maxlength="1" allows 1; maxlength="2" allows 1; maxlength="3" allows 2, maxlength="4" allows 2; maxlength="5" allows 3, etc.

Relevant browser issues: