Only use getAttributeNode on buttons when setting value
This commit is contained in:
parent
3a3842c669
commit
825d3d96ce
2 changed files with 5 additions and 1 deletions
|
@ -435,6 +435,9 @@ if ( !jQuery.support.getSetAttribute ) {
|
|||
// And the name attribute
|
||||
formHook = jQuery.attrHooks.name = jQuery.attrHooks.value = jQuery.valHooks.button = {
|
||||
get: function( elem, name ) {
|
||||
if ( name === "value" && !jQuery.nodeName( elem, "button" ) ) {
|
||||
return elem.getAttribute( name );
|
||||
}
|
||||
var ret = elem.getAttributeNode( name );
|
||||
// Return undefined if not specified instead of empty string
|
||||
return ret && ret.specified ?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue