scrolling jumps to a table

I have a TabSheet. In one of my tabs, I have a panel that is set to scrollable. In my panel, I have a table (page length is zero) that is followed by a number of text fields. When I change the values of the various text fields, I change the contents of the table. This all works, except for one very annoying problem. To change some of the text fields, I must scroll down which causes the table to disappear from view. That’s good. But as soon as I start typing in a text field, the panel scrolls back to table and I now no longer see the text field I am typing in. The text field continues to have the focus. I have found that if I don’t change the table, then the unexpected scrolling does not occur. Also, after changing the table, I tried re-setting the scroll bar position to what it was before I changed the table. Unfortunately, it did not work. Vaadin continues to scroll back up to the table.

And by the way, even though this problem is driving me nuts, I love Vaadin. I’ve been able to do some amazing stuff in a short period of time. Great product.

Any ideas on what I can do to get around this problem?

Thanks in advance.

I just stumbled upon a really bad solution, but it works. Before changing the table, I disable scrolling on the panel. After updating the table, I turn scrolling back on and restore its previous scroll position.

It helps to have a twisted mind.

If anyone has a better idea, I’m all ears. Thanks.

I spoke too soon. My solution works for Chrome and Safari, but failed for Firefox 4. FF4 still scrolls back up to the table. Arghhh!!!

When focusing a row in the table (or giving an enabled table focus), Vaadin does seem to scroll so that the selected row is visible.

Possible workarounds (not sure if these work): disable the table or make it non-selectable when editing.

You could also consider taking the table outside the panel if that fits the UI.

You could
create an enhancement request
to make it possible to configure/control this behavior somehow. Currently, there is no easy way to do it even by subclassing the client side implementation of VScrollTable as the key methods (setRowFocus() and ensureRowIsVisible()) are private.

Henri, that’s it!!! I disabled the table and made it unselectable while editing it and the scrolling stopped. Can’t thank you enough. Vaadin rocks!

I realize this thread is over a year old now, but I’m still facing this problem. I have a table at the top of my page which uses a progress indicator and a table to monitor the status of several jobs. Clicking on any one of the jobs in the table opens up a log viewer in the bottom portion of the page. The logs are pretty long and the user scrolls down. When the table updates itself again, they are shot to the top of the page.

We cannot put the log viewer in another panel because the page is very crowded and a scroll bar on the log viewer would allow only a few log lines to be visible at any given time.

Wondering if there is something i can do to get around this.

Currently on Vaadin 7 if there is any hope of a fix there.

I have similar problem: my form (on popup window) scrolls up every time any component loses focus. The form has a table, but it is at the bottom of a window. Sometimes this behavior disappears for a while, but then reappears again. Vaadin version: 7.1.0

Vaadin 7.1.7 has the same issue