laptop and a wrench

Bug

When a mapping application made with JS API is embedded inside an iframe, it has issues with panning.

Last Published: August 25, 2014 ArcGIS API for JavaScript
Bug ID Number NIM049729
SubmittedOctober 9, 2009
Last ModifiedJune 5, 2024
Applies toArcGIS API for JavaScript
Version foundOther
Program languageJavaScript
Operating SystemWindows OS
Operating System VersionVista
Version FixedArcGISJavaScriptAPI 1.6
StatusFixed

Workaround

From the Developement team:-------------------------------------1. To include the following script after loading the JS API scripts.(function() { if (!dojo || !esri || !esri._MapContainer) { console.error("[ iframe-fix.js ] patch failed"); return; } dojo.addOnLoad(function() { var dc = dojo.connect, ddc = dojo.disconnect; esri._MapContainer.prototype._onMouseDragHandler = function(evt) { ddc(this._onMouseDragHandler_connect); this._onMouseDragHandler_connect = dc(document, "onmousemove", this, "_onMouseDraggingHandler"); ddc(this._onMouseUpHandler_connect); this._onMouseUpHandler_connect = dc(document, "onmouseup", this, "_onDragMouseUpHandler"); this._docLeaveConnect = dc(document, "onmouseout", this, "_onDocMouseOut"); this.onMouseDragStart(this._processEvent(evt)); }; esri._MapContainer.prototype._onDocMouseOut = function(evt) { var related = evt.relatedTarget; if (!related) { // venturing outside the known universe (eg: out of an iframe) this._onDragMouseUpHandler(evt); } }; esri._MapContainer.prototype._onDragMouseUpHandler = function(evt) { this._dragEnd = true; evt = this._processEvent(evt); this.onMouseDragEnd(evt); ddc(this._docLeaveConnect); ddc(this._onMouseDragHandler_connect); ddc(this._onMouseUpHandler_connect); this._onMouseMoveHandler_connect = dc(this.__container, "onmousemove", this, "_onMouseMoveHandler"); this._onMouseUpHandler_connect = dc(this.__container, "onmouseup", this, "_onMouseUpHandler"); this.onMouseUp(evt); }; });}());

Steps to Reproduce

Bug ID: NIM049729

Software:

  • ArcGIS API for JavaScript

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