Set corresponding property to false when removing boolean attributes. Fixes #9094

This commit is contained in:
timmywil 2011-05-04 11:29:38 -04:00
parent 97144424cc
commit 480b88ca37
2 changed files with 12 additions and 1 deletions

View file

@ -369,6 +369,12 @@ jQuery.extend({
jQuery.attr( elem, name, "" );
elem.removeAttributeNode( elem.getAttributeNode( name ) );
}
// Set corresponding property to false for boolean attributes
name = jQuery.propFix[ name ] || name;
if ( !rinvalidChar.test( name ) && typeof elem[ name ] === "boolean" ) {
elem[ name ] = false;
}
}
},