Internet Explorer Plugin - Window gets focused

40 views Asked by At

I am developing an add-on for Internet Explorer, (which is a lot harder that I initially thought), I cannot find an event for window Focus. I have an event for changing tabs, but not if the whole window gets focus for the first time

Anyone has experience with this? There is not a lot of info out there about IE plugins.

1

There are 1 answers

1
Guy Morita On

$(window).on('focus', function(e)... $(window).on('blur', function(e)...

Are typically the events you want to listen for in a normal browser (Chrome, Firefox, Safari) however the events are fired at very odd times in IE.

In IE 8,9,10,11 there is a weird state you can get into where 'focus'/'blur' both fire simultaneously when you focus on the window.

(disclaimer: developing for IE is awful)