IE 9和IE 10不能随时在输入文本框中输入文本 [英] IE 9 and IE 10 cannot enter text into input text boxes from time to time
问题描述
简要说明该页面的工作原理:
-
父页面上有一个按钮。通过点击它将从头开始构建一个
iframe并显示它。这是由Javascript完成的。 同样,iframe上有一个按钮可以关闭它。通过点击它, - 每次我们用iframe修改DOM时重置焦点
-
或安排一个无所事事的耗时任务,这可能会让IE对神奇的鼠标事件作出反应,我无法告诉你为什么,也许M $可以
设置耗时任务的示例代码
setInterval(function(){
var l oopCount = 10000;
var x = 0; (var i = 0; ix =(x + Math.random()* 1000)>
>>>> 0;
}
return x;
},1000);
-
或在将文档从文档中移除之前重置DOM内容
someDivWithIframe.innerHTML =;
$(someDivWithIframe).remove();
我不确定它是否有助于所有情况,您应该尝试
There is a button on the parent page. By clicking it will build an iframe from scratch and show it. This is done by Javascript.
Again, there is a button on the iframe to close it. By clicking it
will remove the iframe from the parent page's DOM.- Reset the focus every time we modify the DOM with iframe
or schedule a "do nothing" time consuming task, which may make IE response to mouse event magically, I could not tell you why, maybe M$ could
The sample codes which setup a time consuming task
setInterval(function () { var loopCount = 10000; var x = 0; for (var i = 0; i < loopCount; i++) { x = (x + Math.random() * 1000) >>> 0; } return x; }, 1000);
or reset the DOM content before remove it from document
someDivWithIframe.innerHTML = ""; $(someDivWithIframe).remove();
I am not sure if it helps for all cases, you should have a tried
将从父页面的DOM中移除iframe。 知道你是否需要进一步的信息。提前致谢。
这个bug非常烦人,更糟糕的是我们在google上找不到任何信息。
微软只有一个关于IE9的链接,但问题仍然存在于IE10 / IE11中,并且更容易重现。
我刚刚创建了一个小提琴来描述这个问题。
http ://jsfiddle.net/WilliamLeung/T3JP9/1/
为什么M $很难解决这个问题多年?
应该有三种解决方法
There is a web page with an iframe inside. Sometimes, Input text box controls, inside the iframe, are locked/ freezed. Users cannot enter text into them. But the text box can be focused and not faded. There is no code to disable the input controls and this does not always happen. Up until now, this is happening only in IE 9 and IE 10. Firefox and Chrome is OK.
Brief description of how the page works is:
Please let me know if you want further information as required. Thanks in advance.
This bug is very annoying, even worse there was very few informations we could find on google.
There is only one link from Microsoft that about IE9, but problem still exists in IE10 / IE11 and much easier to reproduce.
I have just create a fiddle to describe this problem
http://jsfiddle.net/WilliamLeung/T3JP9/1/
Why it is so hard for M$ to fix this issue for years?
there should be three workarounds
这篇关于IE 9和IE 10不能随时在输入文本框中输入文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!