Opened 16 years ago

Closed 15 years ago

#824 closed defect (fixed)

DomWidget.addChild() is not using the reference node passed into it

Reported by: [email protected] Owned by: dylan
Priority: high Milestone: 0.9
Component: DOM Version: 0.3
Keywords: Cc:
Blocked By: Blocking:


DomWidget.addChild() is passed a pos and a ref, but the code seems to be ignoring ref.

DomWidget.addChild() calls addWidgetAsDirectChild, which calls insertAtPosition(). However, it is passing pos and cn to insertAtPosition(). This probably should be pos and ref.

In other words,

dojo.dom.insertAtPosition(widget.domNode, cn, pos);

should probably be changed to

dojo.dom.insertAtPosition(widget.domNode, ref, pos);

unless I'm missing something.

Change History (6)

comment:1 Changed 16 years ago by [email protected]

Actually there is a FIXME nearby that may be related:

// FIXME: should we support addition at an index in the children arr and
// order the display accordingly? Right now we always append.

comment:2 Changed 16 years ago by dylan

Component: GeneralDOM
Milestone: 0.4
Owner: changed from anonymous to dylan
Status: newassigned

comment:3 Changed 16 years ago by dylan

severity: normalblocker

comment:4 Changed 16 years ago by dylan

severity: blockernormal

comment:5 Changed 16 years ago by bill


comment:6 Changed 15 years ago by bill

Resolution: fixed
Status: assignedclosed

The new code in Dijit 0.9 gets an insertIndex only, and I think it's working.

Note: See TracTickets for help on using tickets.