Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#15765 closed defect (invalid)

Tree in 1.8 only formats entrizes after panel resize

Reported by: meley Owned by: meley
Priority: undecided Milestone: tbd
Component: Dijit Version: 1.8.0rc1
Keywords: Cc:
Blocked By: Blocking:


I have a tree used for browsing a folder structure. In 1.7 build this worked perfectly, in 1.8 when an entry is highlighted the highlight only extends to the edge of the text in the entry (previously it highlighted the whole row). If I then resize the container (say with a aplitter) the entries are again highlighted as previously (to the edge of the container)> If I then open new entries the same problem is present on the newly opened nodes (until resize).

This affects drag and drop functionality as the user does not see the row highlighted for the drop but the drop still registers on the correct entry when dropped anywhere.

Attachments (3)

pic1_highlight_working_after_resize.png (3.5 KB) - added by meley 10 years ago.
pic2_highlight_not_working_newly_opened_nodes.png (2.7 KB) - added by meley 10 years ago.
testcase.html (3.7 KB) - added by meley 10 years ago.
Test Case and instructions

Download all attachments as: .zip

Change History (9)

Changed 10 years ago by meley

comment:1 Changed 10 years ago by bill

Owner: changed from bill to meley
Status: newpending

Please attach a test case using the "attach file" button. It should be as small as possible to still reproduce the problem, almost always a single HTML file that we can load in the browser and use to reproduce then problem.

Then, give exact instructions on how to reproduce the problem using your attached test file.

The test case is necessary both to confirm that there's a bug, and for us to be able to debug the problem.


Changed 10 years ago by meley

Attachment: testcase.html added

Test Case and instructions

comment:2 Changed 10 years ago by meley

Status: pendingnew

Attachment (testcase.html) added by ticket reporter.

comment:3 in reply to:  1 Changed 10 years ago by meley

Hi Bill

Test case uploaded.

Best regards, Mark

comment:4 Changed 10 years ago by bill

Resolution: invalid
Status: newclosed

OK, thanks for the test case. The issue is that you need to call startup() on all widgets created programatically. This is documented.

In your case, the way to add a Tree to a ContentPane is to do myContentPane.set("content", myTree). Then the ContentPane will call startup() for you. But instead you are adding the tree without ContentPane knowing it, so it cannot call startup().

I realize your code worked in 1.7, but you were just getting lucky.

comment:5 Changed 9 years ago by meley

Hi Bill

Thanks for the answer and explanation. Sorry to bother you, I was just copying the tree examples from the website and didn't see anything about startup() but I have read up on it now.

Thanks and best regards, Mark

comment:6 Changed 9 years ago by bill

Oof, I didn't realize the programmatic examples didn't call startup(). I updated them now. Thanks for the heads-up.

Note: See TracTickets for help on using tickets.