Reputation: 95880
$(window).blur(function(){ windowFocus = false; }).focus(function(){ windowFocus = true; });
The problem is that in firefox 3, when I create a new tab, it does not lose windowFocus. Where as in ff2, ie7 it does lose. In ff3 it only loses window focus when i select another program.
Anyone have a solution to this problem?
Upvotes: 2
Views: 3716
Reputation: 159590
Attach to the events on document
instead:
$(document).blur(function(){
windowFocus = false;
}).focus(function(){
windowFocus = true;
});
...FWIW, this appears to have been fixed in FF3.5.
Upvotes: 1