简体   繁体   English

IE10是否直接写入“空文本节点”?

[英]IE10 writing directly into an 'Empty Text Node'?

I've been doing a lot of testing in IE10 lately, and have recently ran into a very strange error. 我最近在IE10中进行了大量测试,最近遇到了一个非常奇怪的错误。

Right after closing a jQuery UI dialog, IE10 opens up a cursor and allows the user type directly into the page. 在关闭jQuery UI对话框后,IE10会打开一个光标,并允许用户直接在页面中键入内容。 However, there are no inputs for them to be allowed to put things in, and from using Microsoft's F12 Developer tools, it seems that it is writing directly into the DOM -- an area that was a 'Text - Empty Text Node'. 但是,没有任何输入允许它们放进去,并且使用Microsoft的F12 Developer工具似乎是在直接将其写入DOM(该区域是一个“文本-空文本节点”)。 I have no idea where these nodes are coming from, or why the user can put text into one of them. 我不知道这些节点来自哪里,或者用户为什么可以在其中一个文本中输入文字。 I really have no code to show because it seems to be tied to nothing, and as I keep cutting away layers it still seems to be there. 我真的没有要显示的代码,因为它似乎没有任何联系,而且随着我不断削减层次,它似乎仍然存在。

Has anyone else ran into this? 还有其他人遇到吗? It seems to happen in IE9 as well. 似乎在IE9中也是如此。 I'm at a loss here. 我在这里茫然。

EDIT: In addition, I thought it may be helpful to say that I'm using jQuery datatables here. 编辑:此外,我认为在这里使用jQuery数据表可能会有所帮助。

Okay, so I have made some progress on this. 好吧,所以我在这方面取得了一些进展。

It turns out IE10 isn't writing data directly into the DOM -- instead, it dynamically created a text input, didn't recognize it, and then deletes it. 事实证明IE10并未将数据直接写入DOM中,而是动态创建了文本输入,无法识别文本输入,然后将其删除。 You can type directly into it, but if you click off or focus on anything else, then it disappears and leaves completely. 您可以直接在其中输入内容,但是如果您单击关闭或专注于其他任何内容,则它会消失并完全离开。

I've still not diagnosed the source of the issue -- I know it only happens in IE, and may include datatables or jQuery UI. 我仍然没有诊断出问题的根源-我知道它仅在IE中发生,并且可能包括数据表或jQuery UI。 I tend to believe it's IE specific, because it's such a rare action and there's no trace of it anywhere else. 我倾向于认为它是特定于IE的,因为它是一种罕见的操作,在其他任何地方都找不到它。

Hope this dialog helps someone else down the line. 希望此对话框可以帮助其他人。 If you find a better answer, please post it! 如果您找到更好的答案,请发布!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM