2

选项卡后,我与IE8事件(害怕!),使用Dojo工具包1.4.3(不能使用任何其他版本)在WebSphere Portal服务器上运行的Spring应用程序的问题。道场的onkeyup禁用按下IE8

现在,我不相信后端有什么关系这一点,因为与IE8黏合的问题被称为:

press on any field of a webpage and press tab all the way, the focus goes back up to the url input and buttons and doesn't return to the document after repeating it, if you click on an element in a website it re-adds the focus to that element, but when you press tab again it goes back to the top of the browser.

现在,我的问题发生Tab键后一路和获取把重点放在文件之外。 这似乎在浏览器中除去从DOM事件,我已经调试IE8上的代码,它似乎不会触发回调函数,而它的行为时,通常不这样做整个标签的事情。

我已经尝试使用dojo.disconnect()并随后致电dojo.connect()无济于事重新添加事件,这里有一个小片断:

var connectedObjects = {}; 
dojo.query(".someClass").forEach(function(inputField){ 
    connectedObjects[inputField.id] = {}; 
    connectedObjects[inputField.id].onfocus = dojo.connect(inputField, "onfocus", function(event){ 
     if(connectedObjects[inputField.id]){ 
      dojo.disconnect(connectedObjects[inputField.id].onkeyup); 
      connectedObjects[inputField.id].onkeyup = dojo.connect(inputField, "onkeyup", someCallbackFunction); 
     } 
    }) 
}); 

人对如何解决这个任何想法?

回答

0

所以,这是一个奇怪的,但有一个简单的方法来解决这个问题,这也似乎修复其他浏览器骑自行车通过具有css属性display:none的隐藏输入字段,所以到代码:

dojo.query("*").forEach(function(fieldID){ 
    dojo.attr(fieldID, "tabIndex", "-1"); 
});