Scrollbar trouble


I’ve been having scroll problems with Vaadin lately. I have a panel which has scrolling enabled and contains two other panels. The lower of the two panels loads external html pages into a label component and expands accordingly. This works fine most of the time on desktop environment and I get a nice vertical scrollbar on the container panel.

Now, one of the problems arose when I wanted to test the page on android devices. Unfortunately the scroll function did not work at all. It seems the panel reserves space for the scrollbar, but does not manage to create it and clips the page. With that I mean that, whenever a scrollbar is needed, there’s a gap on the right side of the panel from where you can see the underneath layout.

There’s also another problem which I’ve noticed in desktop environment and wonder if it relates to the problem in android devices. I’ve noticed that, when I click anywhere in the main window, I lose keyboard control over scrolling. I can still scroll with mouse wheel, but page up/down and arrow keys seize functioning.

I’ve tried to solve the problem by commenting all click event listeners from the code, but this did not seem to be the cause of the problem. Therefore I wonder, if this is a thing I can counter by altering my overall design or if it’s a problem in Vaadin components themselves.

I’ll be sincerely thankful for all the help I can get.


What kind of Android device are you using? It is not desktop but has keyboard and mouse?

If you are trying to scroll with a touch device, you could try this addon:


The Android was indeed a mobile touch device, HTC Desire with Android 2.2 to be exact. With desktop I meant desktop PC environment with mouse and keyboard and all such. The design is primarily made for desktop, but I wanted to see how well it works on mobile devices.

And thanks for the addon. I tried it, but it did not ease my problem. Maybe I did something wrong since I saw no difference between having and not having it.

The second problem, the one relating to keyboard, got solved. Seemed like the keyboard scrolling worked when the focus was on buttons. So I tested it a bit and it seemed that when a panel or a layout got the focus (or so I presume, since to my knowledge there’s no way to know which component had focus if there’s no visual indicator) it started hogging the keyboard functions, which prevented scrolling with num keys and so forth.

So, I made a small test program and noticed this did not happen in a very simple case. Then I added my component structure, part by part, into the test program and finally found the culprit. I had set the layout of the main window to full size. I don’t know if this is something to avoid, but when I added the setSizeFull() line into my test program the bug appeared and when I removed it from my actual program the bug disappeared. Therefore, I’m pretty sure it was this little function that caused all the trouble.

But, for now, I can use num keys and page up and down for scrolling even if I click over a panel/layout area. Textfields still seize the functionality, but that’s only a minor problem in my eyes.


I think it was just the same phone that my colleague tried the add-on successfully. The add-on requires you to do GWT recompilation of your widgetset. With eclipse plugin this should be automatically suggested. Also not that for the top level scrolling to work properly, you need to have 6.5 nightly build in use.



Has anyone solved this issue? I have a similar issue with my android device (Sony Eircsson). Basically, I have a tabsheet in the middle of my page and when I try to scroll on the android device, the tabsheet hijacks the event and so prevents the page from scrolling.

I’d be grateful for some hints about how to deal with it.