Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 376261

Summary: [Tree] Expand fails when some do not have icons
Product: [RT] RAP Reporter: Paul Bilnoski <bilnoski>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P2 CC: tbuschto
Version: 1.5   
Target Milestone: 1.5 M7   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
Java file of a ViewPart to demonstrate the problem none

Description Paul Bilnoski CLA 2012-04-06 13:28:38 EDT
Build Identifier: 

I have a tree viewer with the first-tier items all with icons and some second-tier  items have icons, and there are third-tier icons. On the second-tier items, they do not expand until one with icons has been expanded. I will attach a view to reproduce the problem. When running, first expand the first node and then its first child. Then expand the second root note, and attempting to expand its children fails with the mouse but still works using the right arrow key.

Reproducible: Always
Comment 1 Paul Bilnoski CLA 2012-04-06 13:29:49 EDT
Created attachment 213711 [details]
Java file of a ViewPart to demonstrate the problem
Comment 2 Ivan Furnadjiev CLA 2012-04-09 03:40:17 EDT
Strange... I can't  expand the first two children 2.1 and 2.2, but with 2.3 and 2.4 it works. For the third root unable to expand 3.1, but all others are working 3.2, 3.3 and 3.4.
Comment 3 Ivan Furnadjiev CLA 2012-04-09 04:33:49 EDT
The problem is in TreeRow.js#_renderCellImage which does not update the cellImage element bounds in case of missing image. Thus, the cell image element (div) appears on the top of expand symbol element (it keeps the old bounds from the previous rendered item). As a result, TreeRow.js#getTargetIdentifier returns wrong value and expand event is not fired.
Comment 4 Tim Buschtoens CLA 2012-04-09 15:36:33 EDT
Good catch. 
The solution should be to always update the bounds in the tree-column (image and label), even if there is no image/text.
Comment 5 Ivan Furnadjiev CLA 2012-04-10 05:16:08 EDT
Image and label DOM elements bounds are now updated, even if there is no image/text. This is done only for the tree column.