fix issue 1851 as suggested

This commit is contained in:
Tobias Bosch 2011-06-23 13:31:05 +02:00
parent a9fae15c88
commit ff2ef4076b

View file

@ -110,7 +110,10 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
//returns either a set of radios with the same name attribute, or a single checkbox
_getInputSet: function(){
return this.element.closest( "form,fieldset,:jqmData(role='page')" )
if(this.inputtype == "checkbox") {
return this.element;
}
return this.element.closest( "form,fieldset,:jqmData(role='page')" )
.find( "input[name='"+ this.element.attr( "name" ) +"'][type='"+ this.inputtype +"']" );
},