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, 2014No Product Found
Bug ID Number
NIM009258
Submitted
May 23, 2007
Last Modified
June 5, 2024
Applies to
No Product Found
Version found
9.2
Version Fixed
9.3
Status
Fixed
The bug has been fixed. See the Version Fixed and Additional Information, if applicable, for more information.
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); } }