JSFiddle - React, Tailwind, and code Playground
HTML
<form>
<input id="foo" name="bar" maxlength="10" size="20" placeholder="Enter here.."/>
</form>
<h3>Expected</h3>
The native limit no longer applies.
<h3>Actual</h3>
The native limit applies and stronger than ever. Though the maxLength property is and stays "undefined", somehow the attribtue has changed to maxlength="0".
CSS
body {
font-family: sans-serif;
}
form {
padding: 1em;
}
input {
padding: 0.3em 0.2em;
}
JavaScript
var limit;
var myFoo = document.getElementById('foo');
if (myFoo) {
limit = myFoo.maxLength;
myFoo.maxLength = undefined;
}