Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#11019 closed defect (invalid)

dijit.tree's .attr('path') returns undefined on the first call

Reported by: Jean-Rubin Leonard Owned by: anonymous
Priority: high Milestone: tbd
Component: Dijit Version: 1.4.0
Keywords: Cc:
Blocked By: Blocking:


When dijit.tree's .attr('path') is invoked the first time it returns undefined. Any subsequent call returns what's supposed to be return (a list of the path to the selected node).

Attachments (1) (11.6 KB) - added by Jean-Rubin Leonard 12 years ago.

Download all attachments as: .zip

Change History (3)

Changed 12 years ago by Jean-Rubin Leonard

Attachment: added

comment:1 Changed 12 years ago by bill

Resolution: invalid
Status: newclosed

There's no bug here, attr('path') returns the correct selected node as long as you call attr('path') after the user has selected a node in the Tree (by clicking on it or tabbing into it).

In your test case you are connecting to focusNode() and then calling attr('path'), but focusNode() is called in the middle of the onclick processing, right before _selectNode() is called. If you did a setTimeout() etc. it would work.

comment:2 Changed 12 years ago by bill

Component: GeneralDijit

PS: an obvious place to connect is _selectNode().

Note: See TracTickets for help on using tickets.