html - Repeated clicks on iframe don't register as clicks -


i'm using following code in order check when user clicks (cross-domain) iframe:

var myconfobj = {   iframemouseover : false } window.addeventlistener('blur',function(){   if(myconfobj.iframemouseover){     console.log('wow! iframe click!');   } });  document.getelementbyid('your_container_id').addeventlistener('mouseover',function(){    myconfobj.iframemouseover = true; }); document.getelementbyid('your_container_id').addeventlistener('mouseout',function(){     myconfobj.iframemouseover = false; }); 

i'm using check if user clicked google ad, , works fine first time click it. second click on banner doesn't registered (unless refresh page again).

what i've noticed, though, if click anywhere outside iframe after first click, , click banner again, click gets registered.

what tried use 'window.focus();' on mouseover, doesn't fix it.

can me?


Comments

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -