Opened 12 years ago

Closed 12 years ago

#5252 closed defect (fixed)

startup called twice for children of a layout widget within a widget template

Reported by: guest Owned by: dante
Priority: high Milestone: 1.1
Component: Dijit Version: 1.0
Keywords: Cc:
Blocked By: Blocking:

Description

If you define a widget with widgetsInTemplate: true, and there is a layout widget in the template (e.g. LayoutContainer?), then any children of the layout widget have their startup method called twice.

The first call is from _LayoutWidget.startup, and the second is from dojo.parser.instantiate.

Will attach a test case.

Attachments (2)

test.html (695 bytes) - added by guest 12 years ago.
testcase
parser.patch (487 bytes) - added by dante 12 years ago.

Download all attachments as: .zip

Change History (5)

Changed 12 years ago by guest

Attachment: test.html added

testcase

comment:1 Changed 12 years ago by dante

Milestone: 1.1
Owner: set to dante
Status: newassigned

comment:2 Changed 12 years ago by dante

_widget reports this._started=true if it makes it to _Widget.prototype.startup, which the supported behavior is that it should make it up that far in the inheritance chain.

a check for widget._started in parser fixes this issue.

Changed 12 years ago by dante

Attachment: parser.patch added

comment:3 Changed 12 years ago by dante

Resolution: fixed
Status: assignedclosed

(In [12347]) fixes #5252 - sanity check on _started for _Widget

Note: See TracTickets for help on using tickets.