Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Losing focus on slider when scrolling
Hi, I am using a TreeTable with its height and width set to 100% and with paging enabled. When I scroll using the slider and scroll outside the current page, as soon as the new page loads I lose my selection on the slider. This is a little disturbing since you expect that you can keep scrolling as long as you keep your mouse button down. Instead you will have to reselect the slider to continue scrolling. When the new page loads, right before I lose my selection on the slider I see the scroll bar flicker, like its being redrawn or recalculated.
The problem only occurs if I set the height of the TreeTable to 100%. I suspect it has something to do with the fact that the client side will send information about the actual height of the TreeTable back to the server so that it can set its page length correctly, which then causes a redraw of the table or at least the scrollbar.
The Table.setPageLength doc says the following: "If Table has width set (setWidth(float, int) ) the client side may update the page length automatically the correct value." However, wether I set the width or not does not affect my problem.
I am using the TreeTable in the following hierarchy of components (the vaadin debugger shows 0 errors in the layout):
I need the size of the TreeTable and the VerticalLayout to be relative so that the table will grow/shrink if the SplitPanel is resized.
The problem occurs in Chrome and IE8 but not in FireFox. I am using Vaadin 6.7.9.
After some changes to the structure of the layout the problem went away so consider this solved. The original structure was actually as follows (the VerticalLayout that contained the TreeTable was inside a panel which also had height and width set to 100%):
The new structure is: