Opened 13 years ago

Closed 12 years ago

#824 closed defect (fixed)

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

Reported by: jonathan.aquino@… Owned by: dylan
Priority: high Milestone: 0.9
Component: DOM Version: 0.3
Keywords: Cc:
Blocked By: Blocking:

Description

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 13 years ago by jonathan.aquino@…

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 13 years ago by dylan

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

comment:3 Changed 13 years ago by dylan

severity: normalblocker

comment:4 Changed 13 years ago by dylan

Milestone: 0.40.4.1
severity: blockernormal

comment:5 Changed 13 years ago by bill

Milestone: 0.4.10.5

comment:6 Changed 12 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.