TextInput: add a workaround for a bug with maxlength field in some versions of android