Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#15577 closed defect (fixed)

dijit.Tree showing horizontal scrollbar when loading a large tree of external data

Reported by: talisto Owned by: bill
Priority: undecided Milestone: 1.8
Component: Dijit Version: 1.8.0b1
Keywords: Cc:
Blocked By: Blocking:

Description

In my test-case (attached), I have two dijit.Tree widgets, both sized to 150px by 150px. The first tree's store is given data directly via the "data" parameter. The second tree's store is loading the data externally via the "url" parameter. Both data sources have enough records to force a scrollbar on the tree.

The issue is that, the first tree shows a vertical scrollbar (expected), whereas the second tree shows both vertical and horizontal scrollbars.

I've tested this on OSX (10.7.4) on Firefox 13.0.1 and Chrome 20.0.1132.43, both display this issue. However, this is only an issue in 1.8.0b1, not 1.7.3.

Attachments (3)

treedata.json (336 bytes) - added by talisto 7 years ago.
dijit_tree_testcase_result.png (9.2 KB) - added by talisto 7 years ago.
tree.html (1.7 KB) - added by talisto 7 years ago.

Download all attachments as: .zip

Change History (6)

Changed 7 years ago by talisto

Attachment: treedata.json added

Changed 7 years ago by talisto

Changed 7 years ago by talisto

Attachment: tree.html added

comment:1 Changed 7 years ago by bill

Milestone: tbd1.8
Status: newassigned

My bad, I broke it while fixing #13141. I think the issue is that as the tree is drawing it sets the width of each node to 150px (since that's the available content-box, but later on the available width decreases due to the space taken by the vertical scrollbar. (The vertical scrollbar wasn't there when the Tree started drawing.)

dijit.byId("testTree2").resize() will fix the sizing but I'll try to make it work with a manual hack.

comment:2 Changed 7 years ago by bill

Resolution: fixed
Status: assignedclosed

In [29065]:

Fix Tree problem on initial display when it gets a horizontal scrollbar.

The expand operation of the root node was causing a vertical scrollbar to appear, reducing the available width. Since the expand happens in postCreate(), before this._startup is set, startPaint() ignored it. Because the idea was that we would adjust the widths on startup(). However, by the time the expand finishes startup() has already completed, and we to adjust the widths manually.

Fixes #15577, refs #13141 !strict.

comment:3 Changed 7 years ago by talisto

Perfect! Thanks a bunch! :)

Note: See TracTickets for help on using tickets.