Fixed an issue where maxLength property of TextBox won't work

If an `<input>` is created without `maxlength` attribute, then set
`maxLength` *property* won't work in Chrome, so changed to set
*attribute* instead