I need to use some scripts after window.onblur event. But on my app i have Google Maps, which one is injected into iframe. Evervy click on iframe firing window.onblur(). How to prevent this?
Asked
Active
Viewed 1,052 times
1 Answers
1
You can prevent the default window.blur event if the original target of the event is the iframe.
$(window).blur(function(event){
if($(event.target).attr('id')== "myiframe"){
event.preventDefault();
}
});

Pang
- 9,564
- 146
- 81
- 122