Permalink
Show file tree
Hide file tree
1 comment
on commit
Please
sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Only use getAttributeNode on buttons when setting value
- Loading branch information
timmywil
committed
Apr 19, 2011
1 parent
3a3842c
commit 825d3d9
Showing
2 changed files
with
5 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" ) ) { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
timmywil
Member
|
||
return elem.getAttribute( name ); | ||
} | ||
var ret = elem.getAttributeNode( name ); | ||
// Return undefined if not specified instead of empty string | ||
return ret && ret.specified ? | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 comment
on commit 825d3d9
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That should say "getting" value.
Don't yall have a
support
key for thatbutton
bug? If so it's only needed when buggy.