I\'m using jQuery to detect a click on the DOM - or let\'s every click.
$(document).click(function(){ alert(\"Click :-)\"); });
This works p
You can attach the click listener to the main wrapper element (say div that encloses all the components in your page).