From e6f21410ff4e2e88ed5f44c872451e8030898178 Mon Sep 17 00:00:00 2001 From: Scott González Date: Mon, 21 May 2012 12:47:15 -0400 Subject: Don't use :checkbox selector. --- tests/unit/button/button_tickets.js | 10 +++++----- ui/jquery.ui.button.js | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/unit/button/button_tickets.js b/tests/unit/button/button_tickets.js index 43bfdb833..fe0d82fd6 100644 --- a/tests/unit/button/button_tickets.js +++ b/tests/unit/button/button_tickets.js @@ -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 = $( "" ); - group.find( "input:checkbox" ).button(); + group.find( "input[type=checkbox]" ).button(); ok( group.find( "label" ).is( ".ui-button" ) ); group = $( "" ); - group.filter( "input:checkbox" ).button(); + group.filter( "input[type=checkbox]" ).button(); ok( group.filter( "label" ).is( ".ui-button" ) ); group = $( "" ); - group.find( "input:checkbox" ).button(); + group.find( "input[type=checkbox]" ).button(); ok( group.filter( "label" ).is( ".ui-button" ) ); group = $( "" ); - group.find( "input:checkbox" ).button(); + group.find( "input[type=checkbox]" ).button(); ok( group.find( "label" ).is( ".ui-button" ) ); group = $( "" ); - group.filter( "input:checkbox" ).button(); + group.filter( "input[type=checkbox]" ).button(); ok( group.find( "label" ).is( ".ui-button" ) ); }); diff --git a/ui/jquery.ui.button.js b/ui/jquery.ui.button.js index bd0af9408..44dbc68db 100644 --- a/ui/jquery.ui.button.js +++ b/ui/jquery.ui.button.js @@ -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() { -- cgit v1.2.3