Device-Bugs
Device-Bugs copied to clipboard
textarea maxlength inconsistent with new lines
trafficstars
<textarea maxlength="2">

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:
- Webkit (marked as Resolved Fixed): https://bugs.webkit.org/show_bug.cgi?id=74686
- Blink (marked as Fixed): https://bugs.chromium.org/p/chromium/issues/detail?id=104971
- Gecko: https://bugzilla.mozilla.org/show_bug.cgi?id=702296