]> source.dussan.org Git - jquery-ui.git/commitdiff
Don't use :checkbox selector.
authorScott González <scott.gonzalez@gmail.com>
Mon, 21 May 2012 16:47:15 +0000 (12:47 -0400)
committerScott González <scott.gonzalez@gmail.com>
Mon, 21 May 2012 16:47:15 +0000 (12:47 -0400)
tests/unit/button/button_tickets.js
ui/jquery.ui.button.js

index 43bfdb833aea730fd390324ea93a87d13b5a8190..fe0d82fd6659728c3d1764e01d0ce5e362c8758f 100644 (file)
@@ -30,23 +30,23 @@ test( "#6711 Checkbox/Radiobutton do not Show Focused State when using Keyboard
 
 test( "#7092 - button creation that requires a matching label does not find label in all cases", function() {
        var group = $( "<span><label for='t7092a'></label><input type='checkbox' id='t7092a'></span>" );
-       group.find( "input:checkbox" ).button();
+       group.find( "input[type=checkbox]" ).button();
        ok( group.find( "label" ).is( ".ui-button" ) );
 
        group = $( "<input type='checkbox' id='t7092b'><label for='t7092b'></label>" );
-       group.filter( "input:checkbox" ).button();
+       group.filter( "input[type=checkbox]" ).button();
        ok( group.filter( "label" ).is( ".ui-button" ) );
 
        group = $( "<span><input type='checkbox' id='t7092c'></span><label for='t7092c'></label>" );
-       group.find( "input:checkbox" ).button();
+       group.find( "input[type=checkbox]" ).button();
        ok( group.filter( "label" ).is( ".ui-button" ) );
 
        group = $( "<span><input type='checkbox' id='t7092d'></span><span><label for='t7092d'></label></span>" );
-       group.find( "input:checkbox" ).button();
+       group.find( "input[type=checkbox]" ).button();
        ok( group.find( "label" ).is( ".ui-button" ) );
 
        group = $( "<input type='checkbox' id='t7092e'><span><label for='t7092e'></label></span>" );
-       group.filter( "input:checkbox" ).button();
+       group.filter( "input[type=checkbox]" ).button();
        ok( group.find( "label" ).is( ".ui-button" ) );
 });
 
index bd0af94085b38faa15e9763cb1833b126fb7c2a0..44dbc68dbd88f7399dfb4ebce27e0510fc93ed80 100644 (file)
@@ -214,7 +214,7 @@ $.widget( "ui.button", {
        _determineButtonType: function() {
                var ancestor, labelSelector, checked;
 
-               if ( this.element.is(":checkbox") ) {
+               if ( this.element.is("[type=checkbox]") ) {
                        this.type = "checkbox";
                } else if ( this.element.is("[type=radio]") ) {
                        this.type = "radio";
@@ -358,7 +358,7 @@ $.ui.button.version = "@VERSION";
 
 $.widget( "ui.buttonset", {
        options: {
-               items: ":button, :submit, :reset, :checkbox, [type=radio], a, :data(button)"
+               items: ":button, :submit, :reset, [type=checkbox], [type=radio], a, :data(button)"
        },
 
        _create: function() {