Skip to content

Commit

Permalink
Fixes #8380. Follow-up to 09ec464.
Browse files Browse the repository at this point in the history
  • Loading branch information
mathiasbynens committed Feb 25, 2011
1 parent 09ec464 commit 74fde49
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sizzle.js
Original file line number Diff line number Diff line change
Expand Up @@ -622,11 +622,12 @@ var Expr = Sizzle.selectors = {
},

text: function( elem ) {
var attr = elem.getAttribute( 'type' );
var attr = elem.getAttribute( "type" ), type = elem.type;
// IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc)
// use getAttribute instead to test this case
return "text" === attr || ( "text" === elem.type && attr === null );
return "text" === type && ( attr === type || attr === null );
},

radio: function( elem ) {
return "radio" === elem.type;
},
Expand Down

0 comments on commit 74fde49

Please sign in to comment.