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

index 0d93ecedffef1c35402ee087f12900f9474149f0..c274a8473b8db750a667b75b732f064a5f571ee4 100644 (file)
@@ -34,7 +34,7 @@ function assert(noForm, form1, form2) {
 }
 
 test("radio groups", function() {
-       $(":radio").button();
+       $("input[type=radio]").button();
        assert(":eq(0)", ":eq(1)", ":eq(2)");
 
        // click outside of forms
@@ -61,7 +61,7 @@ test("buttonset", function() {
        var set = $("#radio1").buttonset();
        ok( set.is(".ui-buttonset") );
        deepEqual( set.children(".ui-button").length, 3 );
-       deepEqual( set.children("input:radio.ui-helper-hidden-accessible").length, 3 );
+       deepEqual( set.children("input[type=radio].ui-helper-hidden-accessible").length, 3 );
        ok( set.children("label:eq(0)").is(".ui-button.ui-corner-left:not(.ui-corner-all)") );
        ok( set.children("label:eq(1)").is(".ui-button:not(.ui-corner-all)") );
        ok( set.children("label:eq(2)").is(".ui-button.ui-corner-right:not(.ui-corner-all)") );
@@ -76,7 +76,7 @@ test("buttonset (rtl)", function() {
        set = $("#radio1").buttonset();
        ok( set.is(".ui-buttonset") );
        deepEqual( set.children(".ui-button").length, 3 );
-       deepEqual( set.children("input:radio.ui-helper-hidden-accessible").length, 3 );
+       deepEqual( set.children("input[type=radio].ui-helper-hidden-accessible").length, 3 );
        ok( set.children("label:eq(0)").is(".ui-button.ui-corner-right:not(.ui-corner-all)") );
        ok( set.children("label:eq(1)").is(".ui-button:not(.ui-corner-all)") );
        ok( set.children("label:eq(2)").is(".ui-button.ui-corner-left:not(.ui-corner-all)") );
index 624d16716b046bc51074e3115e233888be23b26e..43bfdb833aea730fd390324ea93a87d13b5a8190 100644 (file)
@@ -7,7 +7,7 @@ module( "button: tickets" );
 
 test( "#5946 - buttonset should ignore buttons that are not :visible", function() {
        $( "#radio01" ).next().andSelf().hide();
-       var set = $( "#radio0" ).buttonset({ items: ":radio:visible" });
+       var set = $( "#radio0" ).buttonset({ items: "input[type=radio]:visible" });
        ok( set.find( "label:eq(0)" ).is( ":not(.ui-button):not(.ui-corner-left)" ) );
        ok( set.find( "label:eq(1)" ).is( ".ui-button.ui-corner-left" ) );
 });
index f84d748cf5bfb6b3b92d8e9f9523de1997d103ae..bd0af94085b38faa15e9763cb1833b126fb7c2a0 100644 (file)
@@ -216,7 +216,7 @@ $.widget( "ui.button", {
 
                if ( this.element.is(":checkbox") ) {
                        this.type = "checkbox";
-               } else if ( this.element.is(":radio") ) {
+               } else if ( this.element.is("[type=radio]") ) {
                        this.type = "radio";
                } else if ( this.element.is("input") ) {
                        this.type = "input";
@@ -358,7 +358,7 @@ $.ui.button.version = "@VERSION";
 
 $.widget( "ui.buttonset", {
        options: {
-               items: ":button, :submit, :reset, :checkbox, :radio, a, :data(button)"
+               items: ":button, :submit, :reset, :checkbox, [type=radio], a, :data(button)"
        },
 
        _create: function() {