From c51b29477e2884fc28cfe4de5b64308177678262 Mon Sep 17 00:00:00 2001 From: timmywil Date: Sat, 22 Oct 2011 16:03:57 -0400 Subject: Support setting both the enctype attribute and property (encoding in IE6/7). Fixes #6743. --- src/attributes.js | 8 +++++++- src/support.js | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/attributes.js b/src/attributes.js index 6dc39b97c..58549ec42 100644 --- a/src/attributes.js +++ b/src/attributes.js @@ -316,7 +316,8 @@ jQuery.extend({ notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - // Normalize the name if needed + // All attributes are lowercase + // Grab necessary hook if one is defined if ( notxml ) { name = name.toLowerCase(); hooks = jQuery.attrHooks[ name ] || (rboolean.test( name ) ? boolHook : nodeHook); @@ -619,6 +620,11 @@ if ( !jQuery.support.optSelected ) { }); } +// IE6/7 call enctype encoding +if ( !jQuery.support.enctype ) { + jQuery.propFix.enctype = "encoding"; +} + // Radios and checkboxes getter/setter if ( !jQuery.support.checkOn ) { jQuery.each([ "radio", "checkbox" ], function() { diff --git a/src/support.js b/src/support.js index b407b32c1..f43c5b0ef 100644 --- a/src/support.js +++ b/src/support.js @@ -85,6 +85,9 @@ jQuery.support = (function() { // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) getSetAttribute: div.className !== "t", + // Tests for enctype support on a form(#6743) + enctype: !!document.createElement("form").enctype, + // Will be defined later submitBubbles: true, changeBubbles: true, -- cgit v1.2.3