Ticket #5637 (closed defect: fixed)

Opened 10 months ago

Last modified 10 months ago

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

Reported by: guest Owned by: dante
Priority: high Milestone: 1.1
Component: Dojox Version: 1.0
Severity: major Keywords: dojox.layout.ContentPane window.name overwritten
Cc: vikas.sasidharan@…

Description

Dojo Version: 1.0.1


Whenever you call setContent(...) on a dojox.layout.ContentPane widget, the value of the global property "window.name" 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

test.html (1.6 kB) - added by guest 10 months ago.
Attached test case…

Change History

Changed 10 months ago by guest

Attached test case...

Changed 10 months ago by guest

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

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

Changed 10 months ago by dante

  • milestone set to 1.1

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

switch(node.nodeName.toLowerCase()){

will there be a 1.0.3? not sure. marking 1.1

Changed 10 months ago by peller

  • owner changed from 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

Changed 10 months ago by dante

  • status changed from new to closed
  • resolution set to fixed

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

Note: See TracTickets for help on using tickets.