← Back to release summary

Update <textarea maxlength/minlength> behavior for linebreaks

Category
DOM
Type
New or changed feature
Status
Enabled by default (Chrome 55)
Intent stage
None

Summary

The specification was updated by https://github.com/whatwg/html/commit/163703186794c21daa92cc2718218afa44f26071. Before the change, maxlength/minlength limits |value| length, not |API value| length. In <textarea>, a single linebreak is represented as CR LF in |value|, and LF in |API value|. Firefox and Edge incorrectly applied to |API value|, and WebKit and Blink correctly applied to |value|. But the specification followed Firefox and Edge.

Standards & signals

View on chromestatus.com