Skip to main content

Bug Tracker

Side navigation

Ticket #3688: jquery_button_type.patch


File jquery_button_type.patch, 0.6 KB (added by gabriel, December 05, 2008 08:46AM UTC)
Index: jquery/src/core.js
===================================================================
--- jquery/src/core.js	(revision 5961)
+++ jquery/src/core.js	(working copy)
@@ -1069,7 +1069,7 @@
 			if ( name in elem && notxml && !special ) {
 				if ( set ){
 					// We can't allow the type property to be changed (since it causes problems in IE)
-					if ( name == "type" && jQuery.nodeName( elem, "input" ) && elem.parentNode )
+					if ( name == "type" && (jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button")) && elem.parentNode )
 						throw "type property can't be changed";
 
 					elem[ name ] = value;

Download in other formats:

Original Format