laptop and a wrench

Bug

If a page containing iframe has scroll bars, geometry drawn with tool's client action will be shifted according to the page's scroll position when using Internet Explorer 6 and Internet Explorer 7.

Zuletzt veröffentlicht: August 25, 2014 ArcGIS Server (.NET)
Bug-ID-Nummer NIM039720
EingereichtOctober 29, 2008
Zuletzt geändertApril 28, 2025
Gilt fürArcGIS Server (.NET)
Gefunden in Version9.3
ProgrammspracheC#
BetriebssystemWindows OS
BetriebssystemversionXP
StatusWill Not Be Addressed

Zusätzliche Informationen

No Public Explanation

Workaround

Derek on 7\19\09 - Use the following work around with version 9.3 SP1 and 9.3.1 to override an existing javascript function. Tested using IE6, IE7, IE8 and FF3. Ensure that the browsers cache is cleared before testing the new code. This code is a work around until the issue is fixed in a future release. <script language="javascript" type="text/javascript"> ESRI.ADF.System._makeMouseEventRelativeToElement = function(evt, element, location) { //This method will change offset event coordinates and target to another element var e = evt; if (e.target && element && element !== e.target) { //clone object e = {}; for (var idx in evt) e[idx] = evt[idx]; if (!location) { location = Sys.UI.DomElement.getLocation(element); } if (Sys.Browser.agent === Sys.Browser.InternetExplorer) { if (e.target.parentNode === document.body) { e.target = document.body; } e.offsetX = evt.screenX - window.screenLeft - location.x + document.documentElement.scrollLeft - 2; if (document.parentWindow.frameElement != null && document.parentWindow.frameElement.document != null && document.parentWindow.frameElement.document.documentElement != null) //account for scrolling in parent window when in an iframe e.offsetX += document.parentWindow.frameElement.document.documentElement.scrollLeft; e.offsetY = evt.screenY - window.screenTop - location.y + document.documentElement.scrollTop - 2; if (document.parentWindow.frameElement != null && document.parentWindow.frameElement.document != null && document.parentWindow.frameElement.document.documentElement != null) //account for scrolling in parent window when in an iframe e.offsetY += document.parentWindow.frameElement.document.documentElement.scrollTop; } else { var eventLocation = Sys.UI.DomElement.getLocation(e.target); var diffX = eventLocation.x - location.x; var diffY = eventLocation.y - location.y; e.offsetX += diffX; e.offsetY += diffY; } e.target = element; } return e; }; </script>----------------------------------------------------------**The following workaround applies only to v9.3 (will not work w/ v9.3 sp1 or v9.3.1)**If the IFrame is placed in a scrollable DIV (overflow:auto), scrolling the DIV element does not cause the offset for client geometry to occur.First, make sure the IFrame is in a scrolling DIV element: <div style="width:600px;height:400px;overflow:scroll;"> <iframe src="ControlPage.aspx" width = "1000px" height="800px" /> </div>Next, launch the page containing the IFrame from a link that will remove scrollbars from the browser (removing menu and toolbars will also create more space on the page): function launchMap() { bProps = "toolbar=yes,menubar=no,scrollbars=no,location=no,resizable=yes,status=no,width=800,height=500"; window.open("IFramePage.aspx","map",bProps); }

Schritte zur Reproduzierung

Bug-ID: NIM039720

Software:

  • ArcGIS Server (.NET)

Benachrichtigung erhalten, wenn sich der Status eines Bugs ändert

Esri Support App herunterladen

Weitere Informationen zu diesem Thema erkunden

Unterstützung durch ArcGIS-Experten anfordern

An den technischen Support wenden

Esri Support App herunterladen

Zu Download-Optionen wechseln