laptop and a wrench

Bug

When cursor focus is in a task dialog box, moving the mouse over the map causes the focus to be lost from the task.

Last Published: August 25, 2014 No Product Found
Bug ID Number NIM009258
SubmittedMay 23, 2007
Last ModifiedJune 5, 2024
Applies toNo Product Found
Version found9.2
Version Fixed9.3
StatusFixed

Workaround

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); } }

Steps to Reproduce

Bug ID: NIM009258

Software:

  • No Product Found

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options