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
Focus & keyup events not firing when input type is missing #217
Comments
I've noticed this issue, in my case not due to missing type but because I'm using HTML5 input types: type="email" etc It seems to validate on form submission but doesn't work on the keyup/focus events. Any idea if this can be fixed easily by updating the plugin code? |
bump This issue caused me a couple hours of debugging in my first attempt to use this plugin. Great plugin though. |
Adding |
jQuery doesn't support matching input's without a type attribut with the [type=text] filter, and doesn't plan to fix that. Even if this plugin would work around that, there's still a good chance that something else breaks due to the missing attribute. I'd rather force people to always add type="text" to their markup. @mlynch any thoughts here? |
@jzaefferer from this jQuery bug it seems an empty text attribute is okay to use (defaults to |
In this context, the performance overhead of a custom selector (not going through qSA) should be fine. And is probably more effective then doing input:not([type]). |
…empty type attribute. Added tests and some test markup. Fixes jquery-validation#217
I have a few
<input>
tags in my app that don't have an explicit type set, but they render as type of text by default. After upgrading 1.8.1 to 1.9pre, these fields no longer trigger validations for keyup or focus events.This looks to be due to commit 5ba0df4 where the
:text
selector was replaced with[type='text']
on line 319.The text was updated successfully, but these errors were encountered: