3 ms·
I am not sure it’s a bug. [1] also says (emphasis added) “User agents _may_ prevent the user from causing the element's API value to be set to a value whose le
by Someone 4y ago
I am not sure it’s a bug. [1] also says (emphasis added)
“User agents _may_ prevent the user from causing the element's API value to be set to a value whose length is greater than the element's maximum allowed value length.”
and we have “MAY This word, or the adjective "OPTIONAL", mean that an item is truly optional” [2]
[1] https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#limiting-user-input-length%3A-the-maxlength-attribute https://html.spec.whatwg.org/multipage/form-control-infrastr...
[2] https://www.ietf.org/rfc/rfc2119.txt https://www.ietf.org/rfc/rfc2119.txt
- syrrim 4y agoApple clearly intended to implement it though, and did so incorrectly.
- Someone 4y agoClearly? Where did they say so? I do not rule out that, if you look at the source code or git history of their code, there are comments or test cases explicitly stating they deviate from enforcing a fixed maximum length in code points if doing so breaks up a grapheme cluster. Also: what do other browsers do when you paste, for example, an ‘é’ that is made up of two code points ‘e’ and a combining character into a field that accepts only a single further code point? Do they just add an ‘e’?
- zamadatix 4y agoMost é (like the one in your comment) are just encoded as U+00E9 but manually creating it as a combination and testing on Chrome it does just convert back to being an e on paste.