JSFiddle - React, Tailwind, and code Playground
HTML
<body>
<input type='checkbox' id='testBox'>
</body>
JavaScript
var body = $(document.body);
var input = $('#testBox');
body.on('click', function(e) {
// e.stopPropagation();
console.log('body shift', e.shiftKey);
});
input.on('click', function(e) {
e.stopPropagation();
console.log('input shift:', e.shiftKey, 'checked: ', input.is(':checked'));
});
delete jQuery.event.special.click.trigger
var clickEvent = $.Event('click', { shiftKey: true });
body.trigger(clickEvent);
input.trigger(clickEvent);
console.log('After, input checked: ', input.is(':checked'));