When cursor focus is in a task dialog box, moving the mouse over the map causes the focus to be lost from the task.
上次发布: August 25, 2014No Product Found
漏洞 ID 编号
NIM009258
已提交
May 23, 2007
上次修改时间
June 5, 2024
适用范围
No Product Found
找到的版本
9.2
修正版本
9.3
状态
Fixed
此漏洞已得到修复。 有关详细信息,请参阅“版本修复”和“其他信息”(如果适用)。
解决办法
From Rex Hansen and it works quite well:you can workaround this by removing the onmouseover event on one of the map divs. Here’s some sample code (with comments on the limitations) which inserts a block of JavaScript during page prerender. The functions are called when the page (body) finishes loading. If you need to package this with a task, I suspect you could probably override OnPreRender() in a custom task and stick this in there. protected void Page_PreRender(object sender, EventArgs e) { string scriptKeyCustom = "customChangeScript"; if (!ClientScript.IsStartupScriptRegistered(GetType(), scriptKeyCustom) && !Page.IsPostBack) { // Unset onmouseover events on the map so it does not receive focus. // As a result, keyboard shortcuts will not change cursor // (e.g. Shift will not change cursor to crosshair for a zoom-in operation - // first time in IE, permanent in Mozilla). string scriptBlock = @" function changeADFJS() { setTimeout(unsetFocus, 1000); } function unsetFocus(){ var jsmap = document.getElementById('MapControlDiv_{0}'); jsmap.onmouseover = null; if (isNav){ var mozmap = document.getElementById('MapMozillaLink_{0}'); mozmap.onmouseover = null; } } "; scriptBlock = scriptBlock.Replace("{0}", Map1.ClientID); ClientScript.RegisterClientScriptBlock(GetType(), scriptKeyCustom, scriptBlock, true); } string scriptKey = "loadScript"; if (!ClientScript.IsStartupScriptRegistered(GetType(), scriptKey) && !Page.IsPostBack) { // if Mozilla browser, use DOMContentLoaded event, else add to body onload string scriptBlock = @" if (document.addEventListener) { document.addEventListener(""DOMContentLoaded"", changeADFJS , false); } else { top.document.body.onload = changeADFJS; } "; ClientScript.RegisterClientScriptBlock(GetType(), scriptKey, scriptBlock, true); } }