use triggerHandler to trigger click handler's bound to inputs on label click Fixes #1335

This commit is contained in:
John Bender 2011-10-25 10:39:45 -07:00
parent d8c0fb961f
commit 4daed58a16

View file

@ -74,6 +74,10 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
input.prop( "checked", inputtype === "radio" && true || !input.prop( "checked" ) );
// trigger click handler's bound directly to the input as a substitute for
// how lable clicks behave normally in the browsers1
input.triggerHandler( 'click' );
// Input set for common radio buttons will contain all the radio
// buttons, but will not for checkboxes. clearing the checked status
// of other radios ensures the active button state is applied properly
@ -92,7 +96,6 @@ $.widget( "mobile.checkboxradio", $.mobile.widget, {
},
vclick: function() {
var $this = $(this);
// Adds checked attribute to checked input when keyboard is used