laptop and a wrench

漏洞

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, 2014 No 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); } }

重现步骤

漏洞 ID: NIM009258

软件:

  • No Product Found

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项