Body - , , ( ). , , click . , , .
, , $(document) $(document.body)
$(document).on('click', function(e) {
e.stopPropagation();
console.log('body', e.shiftKey);
});
In addition, to check the area of ββthe body, you can add CSS to check
body{
border:1px solid #F00;
}
See your code in the demo why it doesn't work (only works in the red border area of ββthe demo)
source
share