#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: |
Description
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)
Change History (3)
Changed 11 years ago by
Attachment: | treetest.zip added |
---|
comment:1 Changed 11 years ago by
Resolution: | → invalid |
---|---|
Status: | new → closed |
comment:2 Changed 11 years ago by
Component: | General → Dijit |
---|
PS: an obvious place to connect is _selectNode().
Note: See
TracTickets for help on using
tickets.
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.