Simulate a document.body click event
I am having a big of an issue. 
I have some third party js includes and they popup some info on a button click, that is in an iframe. Of course, I don't have access to this iframe. But the 3rd party captures clicks and closes the iframe popup. So the behaviour is like so -

I am a user, I click on this "3rd party button, an iframe popups up anchored bottom right". Now, if click anywhere on the main parent page (my page), the iframe closes.

Here is the problem. I have some custom form fields/spans etc.... in which I capture the clicks before they bubble up so the document.body never get that "click".

How can I fake this out? I tried "mousedown" and that seems to propagate up. So I then said something like:

    jQuery(document.body).mousedown(function(){
        jQuery(document.body).click();
    })

so, no matter what is mousedown, I try to say there is a click happening. BUT that doesn't work. Not sure why? If I attach that click onto a div and alert - it alerts, but perhaps "natively" it isn't the same.

Any ideas of to truly simulate a body click event when/if the element clicked on has had its native clicked event captures before it can bubble up?

Thanks.
Simulate a document.body click event
===

I am having a big of an issue. 
I have some third party js includes and they popup some info on a button click, that is in an iframe. Of course, I don't have access to this iframe. But the 3rd party captures clicks and closes the iframe popup. So the behaviour is like so -

I am a user, I click on this "3rd party button, an iframe popups up anchored bottom right". Now, if click anywhere on the main parent page (my page), the iframe closes.

Here is the problem. I have some custom form fields/spans etc.... in which I capture the clicks before they bubble up so the document.body never get that "click".

How can I fake this out? I tried "mousedown" and that seems to propagate up. So I then said something like:

    jQuery(document.body).mousedown(function(){
        jQuery(document.body).click();
    })

so, no matter what is mousedown, I try to say there is a click happening. BUT that doesn't work. Not sure why? If I attach that click onto a div and alert - it alerts, but perhaps "natively" it isn't the same.

Any ideas of to truly simulate a body click event when/if the element clicked on has had its native clicked event captures before it can bubble up?

Thanks.