Opened 14 years ago

Closed 14 years ago

Last modified 11 years ago

#5637 closed defect (fixed)

dojox.layout.ContentPane.setContent(...) overwrites the property value to "div".

Reported by: guest Owned by: dante
Priority: high Milestone: 1.1
Component: DojoX Layout Version: 1.0
Keywords: dojox.layout.ContentPane overwritten Cc: [email protected]
Blocked By: Blocking:


Dojo Version: 1.0.1

Whenever you call setContent(...) on a dojox.layout.ContentPane widget, the value of the global property "" gets changed to "div". This behavior is consistent and doesn't depend on the content passed. I believe that the culprit is a missing "var" keyword in line no. 395 :

Is: "switch(name = node.nodeName.toLowerCase()){"

Should be: "switch(var name = node.nodeName.toLowerCase()){"

Attachments (1)

test.html (1.6 KB) - added by guest 14 years ago.
Attached test case…

Download all attachments as: .zip

Change History (6)

Changed 14 years ago by guest

Attachment: test.html added

Attached test case...

comment:1 Changed 14 years ago by guest

My bad! :-(. The fix I had suggested was itself buggy. The correct fix is:

var name;
switch(name = node.nodeName.toLowerCase()){

comment:2 Changed 14 years ago by dante

Milestone: 1.1

actuall the var name; goes unused throughout the function. try just


will there be a 1.0.3? not sure. marking 1.1

comment:3 Changed 14 years ago by Adam Peller

Owner: changed from Adam Peller to dante

we can always queue things in 1.0.x whether or not there will be a release, but given that it's experimental code in dojox, trunk ought to be sufficient

comment:4 Changed 14 years ago by dante

Resolution: fixed
Status: newclosed

(In [12164]) fixes #5637 - stray global in dojox contentpane !strict

comment:5 Changed 11 years ago by bill

Component: DojoxDojoX Layout
Note: See TracTickets for help on using tickets.