Fix for issue# 301 (IE 7-9 problems with "required" attribute) #344

Closed
wants to merge 3 commits into
from

2 participants

@paultregoing

This small fix will enable non-HTML5 browsers to return a boolean true from the .prop() call in .attributeRules() - eliminating the need to do browser detection and attribute/class manipulation during $(document).ready().

This change will fix the currently open issue #301

#301

@mlynch

Paul, I just tested this on Firefox 3.6 and it does not behave correctly. Specifically, the attribute is empty which on non-HTML5 browsers will not return a boolean true on attribute access, but technically it is still defined (though it's a "falsy" value).

Could you revise this to handle this case? Thanks.

@mlynch

Just to add, this is certainly a bug as our original code and tests fail under this browser and need to be fixed, so handling an an attribute that has the empty string as a value rather than undefined will help us fix this.

@paultregoing

I'll see what I can do, and thanks for the feedback.

@paultregoing

It appears that firefox 3.6 has some issues with respect to this attribute, see the following:

http://bugs.jquery.com/ticket/9504
http://bugs.jquery.com/ticket/9990

My own testing on this browser showed that custom attributes would return their values (with $.attr() at least) but "required" always returned undefined. Which is annoying to say the least.

However, there is a workaround using... gasp native javascript. I'll push the FF3.6 fix and make a new pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment