如何在IE8中禁用body.blur()? [英] How do I disable body.blur() in IE8?
问题描述
我在IE8中运行的企业Web应用程序上工作。在主体上调用 blur()
,导致IE窗口被发送到后台。不幸的是,这段代码属于供应商控制的应用程序的一部分。
I work on an enterprise web application that runs in IE8. It appears blur()
is being called on the body causing the IE window to be sent to the background. Unfortunately this code is in a portion of the application that is controlled by the vendor.
有没有办法阻止 blur()
来自身体上的调用而不修改实际调用的代码 body.blur()
?
Is there any possible way to prevent blur()
from being called on the body without modifying the code that is actually calling body.blur()
?
由于这是一个企业应用程序,因此可以接受应用程序本身更改之外的解决方案;比如改变IE8设置,注册表等等。
Since this is an enterprise application, solutions outside of changes in the application itself are acceptable; Such as changes to IE8 settings, registry, etc.
推荐答案
你应该可以硬编码模糊
到一个虚拟方法。如果你可以在调用它之前进入,只需调用 body.blur = function(){};
(假设 body
指向你的DOM body元素。)
You should be able to hard code blur
to a dummy method. If you can get in before it is called, just call body.blur = function() {};
(assuming body
is pointing to your DOM body element).
这篇关于如何在IE8中禁用body.blur()?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!