| Summary: | VerticalScrollBar truncates content when using GridTreeViewer | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Stephan Krall <stephan.krall> | ||||
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | ||||||
| Version: | 3.1 | ||||||
| Target Milestone: | 3.2 M1 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| Whiteboard: | sr311 | ||||||
| Attachments: |
|
||||||
Fixed in master branch with change https://git.eclipse.org/r/#/c/76421/ Backported to 3.1-maintenance branch. |
Created attachment 262497 [details] Snippet outlining the bug Content of the Grid Widget gets truncated by the vertical Scrollbar if certain preconditions are fulfilled and Scrollbar has no "show on hover" (i.e. show always when visible property is set) behaviour due to a modified CSS. First the tree must not be shallow (deep hierarchy). Second, the total column width must be slightly smaller than the width of the Grid. Third, the size of the content of the first column must be larger than its initial bounds. Additionally for the GridTreeViewer viewer, viewer.getGrid().setAutoHeight() must be called. Finally the height of all items (root and expanded ones) must not exceed the height of the clientArea of the Grid. If this preconditions are fulfilled and the elements of the Grid are expanded then a vertical Scrollbar is displayed but not a horizontal one, thus truncating the content of the last column if its style is set to SWT.RIGHT. Furthermore the status change (Scrollbar hidden -> not hidden) is not communicated to the server. This error is due to a bug in the method Grid._getLastPageRowCount (used by _updateScrollHeight) which calculates the height incorrectly using GridItem.getOwnHeight. More specifically the method does not consider the expanded child elements in its calculation. _updateScrollHeight is called due to a event emitted during the render phase which in turn is trigged by changing the height of the dom element of the corresponding GridItems due to viewer.getGrid().setAutoHeight(). For further details please see the attached snippet.