Firefox 3窗口焦点和模糊 [英] Firefox 3 window focus and blur
本文介绍了Firefox 3窗口焦点和模糊的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
windowFocus = false;
})。focus(function(){
windowFocus = true;
});
问题是,在firefox 3中,当我创建一个新的选项卡时,它不会丢失windowFocus。在ff2中,ie7它确实输了。在ff3中,当我选择另一个程序时,它只会失去窗口焦点。
任何人都有解决这个问题的方法吗?
文档上的事件:
()函数()函数(){
windowFocus = false;
})。焦点(函数(){
windowFocus = true;
});
<...> FWIW,这个在FF3.5中似乎已经被修正了。
$(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?
解决方案
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.
这篇关于Firefox 3窗口焦点和模糊的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文