Jelly Bean doesn\'t seem to like the maxlength attribute of HTML for text input. It certainly restricts the number of input characters but the moment you attemp
Handle the keypress separately for input fields where you need to restrict the maxlength by adding a separate class and listen keypress for that class.
HTML
Javascript
$(".charlength").keypress(function(event) {
if(event.which >= 32 || event.which == 13) {
var maxLength = event.currentTarget.maxLength;
var length = event.currentTarget.value.length;
if(length >= maxLength) {
event.preventDefault();
}
}
});