Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix for VML-related issues. Fixes #17.

  • Loading branch information...
commit d2d8400cf7203a91236cf604840f045fe3b35b76 1 parent c50b0cd
John Firebaugh authored jeresig committed
Showing with 11 additions and 9 deletions.
  1. +11 −9 sizzle.js
20 sizzle.js
View
@@ -625,38 +625,40 @@ var Expr = Sizzle.selectors = {
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" === type && ( attr === type || attr === null );
+ return elem.nodeName.toLowerCase() === "input" && "text" === type && ( attr === type || attr === null );
},
radio: function( elem ) {
- return "radio" === elem.type;
+ return elem.nodeName.toLowerCase() === "input" && "radio" === elem.type;
},
checkbox: function( elem ) {
- return "checkbox" === elem.type;
+ return elem.nodeName.toLowerCase() === "input" && "checkbox" === elem.type;
},
file: function( elem ) {
- return "file" === elem.type;
+ return elem.nodeName.toLowerCase() === "input" && "file" === elem.type;
},
+
password: function( elem ) {
- return "password" === elem.type;
+ return elem.nodeName.toLowerCase() === "input" && "password" === elem.type;
},
submit: function( elem ) {
- return "submit" === elem.type;
+ return elem.nodeName.toLowerCase() === "input" && "submit" === elem.type;
},
image: function( elem ) {
- return "image" === elem.type;
+ return elem.nodeName.toLowerCase() === "input" && "image" === elem.type;
},
reset: function( elem ) {
- return "reset" === elem.type;
+ return elem.nodeName.toLowerCase() === "input" && "reset" === elem.type;
},
button: function( elem ) {
- return "button" === elem.type || elem.nodeName.toLowerCase() === "button";
+ return elem.nodeName.toLowerCase() === "input" && "button" === elem.type ||
+ elem.nodeName.toLowerCase() === "button";
},
input: function( elem ) {
Please sign in to comment.
Something went wrong with that request. Please try again.