how to avoid having a window scrolled all the way down when loaded?


I have a probem with an application with a layout which calculated height is bigger than my browser height. When I use either a VerticalLayout or a Panel (scrollable) with a verticallayout as the root of the window, the scrollbar appears and when the page is loaded, it is by default on the bottom and not all the way up like I think it should be.

The verticallayout is of undefined height and all the components inside it have a defined size (width and heigth). The scrollbar shows just fine but I cannot find a way to have the page scrolled all the way up when loaded.

Does anybody ever encountered this problem and if yes did find a solution?

Btw i am using vaadin 6.8.5


Never seen this behaviour … Would be interesting to see a simple, compilable example that reproduces the error.

well after an extensive debugging i found it was totally my fault. I had a focus() on a button way down my code hierarchy! Sorry for the troubles.