Opened 14 years ago

Closed 14 years ago

#4626 closed defect (invalid)

[StackContainer] bug in addChild()/_setupChild()

Reported by: guest Owned by: Adam Peller
Priority: high Milestone: 1.0
Component: Dijit Version: 0.9
Keywords: StackContainer child page addChild _setupChild Cc:
Blocked By: Blocking:


In the addChild function, the _setupChild is used. After this use, child became null. The _setupChild 's usage in addChild isn't correct:


the "child=" is uncessary and "this._setupChild(child)" is sufficient and doesn't create bug.

functions code:

addChild: function(/*Widget*/ child, /*Integer?*/ insertIndex)
		dijit._Container.prototype.addChild.apply(this, arguments);

			// in case the tab titles have overflowed from one line to two lines
			dojo.publish("-addChild", [child]);

			// if this is the first child, then select it
_setupChild: function(/*Widget*/ page){
		// Summary: prepare the given child = "none";

		// since we are setting the width/height of the child elements, they need
		// to be position:relative, or IE has problems (See bug #2033) = "relative";
		return page;

Change History (3)

comment:1 Changed 14 years ago by Adam Peller

Milestone: 1.0
Owner: set to Adam Peller

comment:2 Changed 14 years ago by Adam Peller

right... I think the child= assignment was there from the time when setupChild used to actually alter the child in subclasses (AccordionContainer? used to do this, it doesn't anymore)

I'm not sure I see the harm in leaving this assignment there. _setupChild returns the argument which is passed in, so the variable is assigned to itself. What's the bug? How is it reproduced?

comment:3 Changed 14 years ago by Adam Peller

Resolution: invalid
Status: newclosed

please reopen with a test case

Note: See TracTickets for help on using tickets.