Opened 11 years ago

Closed 11 years ago

#7195 closed defect (fixed)

Tree: shows "undefined" error upon close in IE

Reported by: pmolchanov2002 Owned by: bill
Priority: high Milestone: 1.2
Component: Dijit Version: 1.1.1
Keywords: Tree Cc:
Blocked By: Blocking:

Description

Hi,

I have simple example where IE 7.0 shows "undefined" error upon page close.

Tree opens and load data fine, however on close shows the "undefined" error. The data store is created with JavaScript?.

Attachments (2)

tree.html (771 bytes) - added by pmolchanov2002 11 years ago.
data.json (2.5 KB) - added by pmolchanov2002 11 years ago.

Download all attachments as: .zip

Change History (5)

Changed 11 years ago by pmolchanov2002

Attachment: tree.html added

Changed 11 years ago by pmolchanov2002

Attachment: data.json added

comment:1 Changed 11 years ago by bill

Milestone: future1.2
Owner: set to bill
Priority: normalhigh
Status: newassigned
Summary: digit.Tree shows "undefined" error upon close in IE 7.0Tree: shows "undefined" error upon close in IE

Thanks for the test case... it reproduces for me; I'll work on it.

It deals with destroying all the widgets on page unload.

comment:2 Changed 11 years ago by bill

More information:

getChildren() and similar methods in _Container are broken for TreeNodes w/out children. It's because TreeNode has an optimization where it doesn't create the containerNode until it's needed (so TreeNode.containerNode isn't defined). dijit._Container can't handle that, as a line like

return dojo.query("> [widgetId]", this.containerNode).map(dijit.byNode); // Widget[]

ends up becoming

return dojo.query("> [widgetId]", null);

which doesn't do what we want.

comment:3 Changed 11 years ago by bill

Resolution: fixed
Status: assignedclosed

(In [14500]) Deferred creation of TreeNode?.containerNode was breaking _Container.getChildren(), hasChildren(), etc., which in turn was causing problem w/tree destruction.

Simplify things by just creating containerNode up front for every TreeNode?, even leaf nodes.

Fixes #7195 !strict

Note: See TracTickets for help on using tickets.