aboutsummaryrefslogtreecommitdiffstats
path: root/src/attributes
diff options
context:
space:
mode:
authorTimmy Willison <timmywillisn@gmail.com>2015-10-18 17:21:41 -0400
committerTimmy Willison <timmywillisn@gmail.com>2015-10-21 16:23:44 -0400
commit47ccf3daadc4b312f850502300129952e70f9d9d (patch)
tree29e0b1066f17a695fa7091752a43e42450072b77 /src/attributes
parent15ac848868e993dfe5ccd7751a94f5c8edc288bc (diff)
downloadjquery-47ccf3daadc4b312f850502300129952e70f9d9d.tar.gz
jquery-47ccf3daadc4b312f850502300129952e70f9d9d.zip
Attributes: do not set properties to false when removing booleans
Fixes gh-1759
Diffstat (limited to 'src/attributes')
-rw-r--r--src/attributes/attr.js12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/attributes/attr.js b/src/attributes/attr.js
index f88808324..ae48676d1 100644
--- a/src/attributes/attr.js
+++ b/src/attributes/attr.js
@@ -86,21 +86,12 @@ jQuery.extend( {
},
removeAttr: function( elem, value ) {
- var name, propName,
+ var name,
i = 0,
attrNames = value && value.match( rnotwhite );
if ( attrNames && elem.nodeType === 1 ) {
while ( ( name = attrNames[ i++ ] ) ) {
- propName = jQuery.propFix[ name ] || name;
-
- // Boolean attributes get special treatment (#10870)
- if ( jQuery.expr.match.bool.test( name ) ) {
-
- // Set corresponding property to false
- elem[ propName ] = false;
- }
-
elem.removeAttribute( name );
}
}
@@ -120,6 +111,7 @@ boolHook = {
return name;
}
};
+
jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) {
var getter = attrHandle[ name ] || jQuery.find.attr;