New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: maxLengthIndicator is undefined #48
Comments
I guess this happens if you apply this plugin to elements without the maxlength attribute defined. Can you please double check if the jQuery selector you use to apply the plugin doesn't selects inputs without the maxlength attribute? |
....find("input[maxlength]").maxlength({ alwaysShow: true }); That's a part of my code, so I don't think the selector is wrong. |
I see, I think what happens is that in the selection there are also hidden inputs.
I will manage this in the internal selector of the plugin, to avoid the exception. |
But my input[type='hidden'] fields don't have the maxlength attribute, I don't think that's the reason for the error. |
Can you please create a fiddle where to reproduce the issue? |
Why did you close this issue? I will try to create a fiddle which shows this problem as soon as possible, but I can not determine a pattern when this happens, it just happens sometimes and sometimes not.. |
So I tried the un-minified version and I get an error at this line: outerWidth = maxLengthIndicator.outerWidth(), TypeError: maxLengthIndicator is undefined EDIT: $("ul.treeview").find("input, select").attr("disabled", false);
$("ul.treeview[data-field-name]").remove(); |
Try putting your "maxlength()" call on $(window).load() and not on DOM Ready. Worked for me. |
have the same problem. By me it happens when I resize the window. Obviously not working so good with responsive layout. I solved it with updating to the new version 1.5.7. The problem was in 1.5.0. |
Sometimes I get this error and I have absolutely no clue where it is coming from.
I think it could have to do that some of my form fields are hidden, but I can not determine any pattern (I don't get it always on the same page and same code).
The text was updated successfully, but these errors were encountered: