Fix propagation on click

Fixes #17630
This commit is contained in:
Mike Jolley 2017-11-15 14:34:35 +00:00
parent cbc143e021
commit 36ce76434a
1 changed files with 12 additions and 6 deletions

View File

@ -36,9 +36,15 @@ jQuery( function( $ ) {
} );
$( '.wc-wizard-services' ).on( 'click', '.wc-wizard-service-enable', function( e ) {
e.stopPropagation();
var eventTarget = $( e.target );
if ( eventTarget.is( 'input' ) ) {
e.stopPropagation();
return;
}
var $checkbox = $( this ).find( 'input[type="checkbox"]' );
var $checkbox = $( this ).find( '.wc-wizard-service-toggle input' );
$checkbox.prop( 'checked', ! $checkbox.prop( 'checked' ) ).change();
} );