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

Bug 318293

Summary: [Table] Scrolling in Tables in IE
Product: [RT] RAP Reporter: Markus Krüger <webmaster>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: ivan
Version: 1.3   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Bug Depends on: 314763    
Bug Blocks:    

Description Markus Krüger CLA 2010-06-29 07:15:57 EDT
If a table's heigth is not so big, than the scrolling does not work correctly in IE.

For example:
Open the RAP demo in IE7/8 with startup=controls, then open the Tab "Table" or "TableViewer", than reduce the shell height so that you can only see four lines of the table.
Now, if you click on the "down"-button of the scrollbar, then the table only shifts about every secend click. I think, it should shift on every click as it does in trees. It works perfect there.
Comment 1 Ivan Furnadjiev CLA 2010-06-30 08:29:18 EDT
The reason for this behavior is that the scrollbar increment in IE depends on scrollbar size (height). In different browsers we have:
- FF 3.6.x - constant scroll increment of 19px
- Chrome 6 - constant scroll increment of 40px
- Safari 5 - constant scroll increment of 40px
- Opera 10.5.x - constant scroll increment of 30px
- IE 8 - variable scroll increment, depends on scroll height: 4 rows - 8px, 5 rows - 11px, 6 rows - 13px, 10 rows - 21px...
Table/Tree uses native browser scrollbars and it is not possible to adjust/set the scroll increment. The only possible solution is to replace browser native scrollbars with a custom one (new javascript widget or slider widget). In table we specially scroll on full visible row. In tree, due to client side limitations, it's possible to scroll on a partly visible row, but this is a bug and not a feature.
Comment 2 Markus Krüger CLA 2010-06-30 08:32:17 EDT
So, is there anything that can be done or is this behavior inteded?
Comment 3 Ivan Furnadjiev CLA 2010-06-30 08:35:25 EDT
The full row scroll is inteded - same like in SWT.
Comment 4 Markus Krüger CLA 2010-06-30 08:40:38 EDT
In SWT everthing scrolls nice when I click only on the scroll button, so this is a bug in calculation of row size in IE?
Comment 5 Ivan Furnadjiev CLA 2010-06-30 09:15:41 EDT
In SWT the scrollbar increment is adjusted/set to the row (item) height. Thus, single click on the scroll button, scrolls exactly one full table row (item). In RAP we can't adjust the browser native scrollbar increment. If the item height is 15px and in IE the scrollbar increment is 8px, we need 2 clicks (16px = 2 x 8px) to scroll to the next full visible item. If you increase the table height and have  scrollbar increment in IE = 15px, single click on the button will scroll exactly one item. With a bigger in height tables (bigger scrollbar increment), it's possible to scroll more than one item with a single click. This is the case with Safari, Chrome where the scrollbar increment is 40px.
Comment 6 Markus Krüger CLA 2010-06-30 13:00:31 EDT
Ok, so there is possibly no solution as far as I understand, right?
Comment 7 Ivan Furnadjiev CLA 2010-06-30 13:10:44 EDT
yes.
Comment 8 Ivan Furnadjiev CLA 2010-07-01 03:51:09 EDT
I will close it as WINTFIX as there is no feasible solution.
Comment 9 Ralf Sternberg CLA 2010-07-01 04:30:57 EDT
If I understand it correctly, this issue would be resolved if we implement our own scrollbars (see bug 314763).
Comment 10 Ivan Furnadjiev CLA 2010-07-01 04:43:23 EDT
Yes Ralf... Our own scrollbar with ability to set the scroll increment will resolve this issue.