Skip to content

Commit 9ac52de

Browse files
committed
Don't use :radio selector.
1 parent 1e586dc commit 9ac52de

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

tests/unit/button/button_core.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function assert(noForm, form1, form2) {
3434
}
3535

3636
test("radio groups", function() {
37-
$(":radio").button();
37+
$("input[type=radio]").button();
3838
assert(":eq(0)", ":eq(1)", ":eq(2)");
3939

4040
// click outside of forms
@@ -61,7 +61,7 @@ test("buttonset", function() {
6161
var set = $("#radio1").buttonset();
6262
ok( set.is(".ui-buttonset") );
6363
deepEqual( set.children(".ui-button").length, 3 );
64-
deepEqual( set.children("input:radio.ui-helper-hidden-accessible").length, 3 );
64+
deepEqual( set.children("input[type=radio].ui-helper-hidden-accessible").length, 3 );
6565
ok( set.children("label:eq(0)").is(".ui-button.ui-corner-left:not(.ui-corner-all)") );
6666
ok( set.children("label:eq(1)").is(".ui-button:not(.ui-corner-all)") );
6767
ok( set.children("label:eq(2)").is(".ui-button.ui-corner-right:not(.ui-corner-all)") );
@@ -76,7 +76,7 @@ test("buttonset (rtl)", function() {
7676
set = $("#radio1").buttonset();
7777
ok( set.is(".ui-buttonset") );
7878
deepEqual( set.children(".ui-button").length, 3 );
79-
deepEqual( set.children("input:radio.ui-helper-hidden-accessible").length, 3 );
79+
deepEqual( set.children("input[type=radio].ui-helper-hidden-accessible").length, 3 );
8080
ok( set.children("label:eq(0)").is(".ui-button.ui-corner-right:not(.ui-corner-all)") );
8181
ok( set.children("label:eq(1)").is(".ui-button:not(.ui-corner-all)") );
8282
ok( set.children("label:eq(2)").is(".ui-button.ui-corner-left:not(.ui-corner-all)") );

tests/unit/button/button_tickets.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module( "button: tickets" );
77

88
test( "#5946 - buttonset should ignore buttons that are not :visible", function() {
99
$( "#radio01" ).next().andSelf().hide();
10-
var set = $( "#radio0" ).buttonset({ items: ":radio:visible" });
10+
var set = $( "#radio0" ).buttonset({ items: "input[type=radio]:visible" });
1111
ok( set.find( "label:eq(0)" ).is( ":not(.ui-button):not(.ui-corner-left)" ) );
1212
ok( set.find( "label:eq(1)" ).is( ".ui-button.ui-corner-left" ) );
1313
});

ui/jquery.ui.button.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ $.widget( "ui.button", {
216216

217217
if ( this.element.is(":checkbox") ) {
218218
this.type = "checkbox";
219-
} else if ( this.element.is(":radio") ) {
219+
} else if ( this.element.is("[type=radio]") ) {
220220
this.type = "radio";
221221
} else if ( this.element.is("input") ) {
222222
this.type = "input";
@@ -358,7 +358,7 @@ $.ui.button.version = "@VERSION";
358358

359359
$.widget( "ui.buttonset", {
360360
options: {
361-
items: ":button, :submit, :reset, :checkbox, :radio, a, :data(button)"
361+
items: ":button, :submit, :reset, :checkbox, [type=radio], a, :data(button)"
362362
},
363363

364364
_create: function() {

0 commit comments

Comments
 (0)