Commit 6171e0a9 authored by timmywil's avatar timmywil

Retrieve the class attribute on a form in IE6/7. Fixes 9286.

parent cf702496
...@@ -322,7 +322,9 @@ jQuery.extend({ ...@@ -322,7 +322,9 @@ jQuery.extend({
hooks = boolHook; hooks = boolHook;
// Use formHook for forms and if the name contains certain characters // Use formHook for forms and if the name contains certain characters
} else if ( formHook && (jQuery.nodeName( elem, "form" ) || rinvalidChar.test( name )) ) { } else if ( formHook && name !== "className" &&
(jQuery.nodeName( elem, "form" ) || rinvalidChar.test( name )) ) {
hooks = formHook; hooks = formHook;
} }
} }
......
...@@ -40,7 +40,7 @@ test("jQuery.attrFix/jQuery.propFix integrity test", function() { ...@@ -40,7 +40,7 @@ test("jQuery.attrFix/jQuery.propFix integrity test", function() {
}); });
test("attr(String)", function() { test("attr(String)", function() {
expect(38); expect(39);
equals( jQuery("#text1").attr("type"), "text", "Check for type attribute" ); equals( jQuery("#text1").attr("type"), "text", "Check for type attribute" );
equals( jQuery("#radio1").attr("type"), "radio", "Check for type attribute" ); equals( jQuery("#radio1").attr("type"), "radio", "Check for type attribute" );
...@@ -117,6 +117,9 @@ test("attr(String)", function() { ...@@ -117,6 +117,9 @@ test("attr(String)", function() {
ok( jQuery("<div/>").attr("doesntexist") === undefined, "Make sure undefined is returned when no attribute is found." ); ok( jQuery("<div/>").attr("doesntexist") === undefined, "Make sure undefined is returned when no attribute is found." );
ok( jQuery().attr("doesntexist") === undefined, "Make sure undefined is returned when no element is there." ); ok( jQuery().attr("doesntexist") === undefined, "Make sure undefined is returned when no element is there." );
var $form = jQuery("<form class='something'></form>").appendTo("#qunit-fixture");
equal( $form.attr("class"), "something", "Retrieve the class attribute on a form" );
}); });
if ( !isLocal ) { if ( !isLocal ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment