Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#6276 closed defect (fixed)

dojo._getIeDispatcher issue with multiversion support

Reported by: James Burke Owned by: James Burke
Priority: high Milestone: 1.1
Component: General Version: 1.1b1
Keywords: Cc:
Blocked By: Blocking:

Description

dojo._getIeDispatcher in _base/event.js uses "dojo" in a string context. This breaks the multiversion support and causes nasty event errors in IE (when dojo is used in a multiversion environment). The fix is to change this:

dojo._getIeDispatcher = function(){
    // ensure the returned function closes over nothing
    return new Function("dojo._ieDispatcher(arguments, this)"); // function
}

to this (notice the usage of dojo._scopeName)

dojo._getIeDispatcher = function(){
    // ensure the returned function closes over nothing
    return new Function(dojo._scopeName + "._ieDispatcher(arguments, this)"); // function
}

I verified this fixes the problem. I can do the change for 1.1 if I get the OK to apply the above fix. I consider this a blocker if we want multiversion support to work. Sorry, I should have seen this issue sooner.

Change History (9)

comment:1 Changed 11 years ago by James Burke

Ugh, some other "dojo" references that should really be dojo._scopeName:

dijit/_base/popup.js: dijit.BackgroundIframe?:

iframe.style.setExpression("width", "dojo.doc.getElementById('" + node.id + "').offsetWidth");
iframe.style.setExpression("height", "dojo.doc.getElementById('" + node.id + "').offsetHeight");

dijit/_editor/plugins/FontChoice.js: Line 146: Uses "dijitEditorButton-"+this.command+(this._uniqueId++) but probably should be dijit._scopeName + "EditorButton?-"+this.command+(this._uniqueId++)

dojox/charting/widget/Chart2D.js: Some "dojox" references, like the type variable in collectAxisParams(). It seems to be used as part of an eval call. May be safe, but I would prefer dojox._scopeName was used instead.

dojox/cometd/timesync.js: Line 96, a setTimeout call referencing "dojox.cometd.publish..."

dojox/grid/VirtualGrid.js: Line 244 in buildViews(): uses "dojox.GridView?" when it should be dojox._scopeName + ".GridView?"

dojox/gfx/_base.js: Line 124: the _getUniqueId function uses "dojoUnique" as part of the ID. It should be dojo._scopeName + "Unique".

dojox/layout/ContentPane.js: Line 438: Uses "dijit.byId..." but should be dijit._scopeName + ".byId..."

comment:2 Changed 11 years ago by James Burke

(In [13172]) Refs #6276. Allow multiversion support. !strict

comment:3 Changed 11 years ago by James Burke

(In [13173]) Refs #6276. Allow multiversion support.

comment:4 Changed 11 years ago by James Burke

(In [13174]) Refs #6276. Allow multiversion support.

comment:5 Changed 11 years ago by James Burke

(In [13175]) Refs #6276. Allow multiversion support.

comment:6 Changed 11 years ago by James Burke

(In [13176]) Refs #6276. Allow multiversion support. !strict

comment:7 Changed 11 years ago by James Burke

(In [13177]) Refs #6276. Allow multiversion support. !strict

comment:8 Changed 11 years ago by James Burke

Resolution: fixed
Status: newclosed

comment:9 Changed 11 years ago by James Burke

(In [13210]) Refs #6276. Make sure the attribute IDs are multiversion aware. !strict

Note: See TracTickets for help on using tickets.