Vaadin Overflow:hidden

There are many things about Vaadin that I really like but a few things are a continuing annoyance.

I continuously struggle with contents of layouts getting clipped because of overflow:hidden. It is really a bit frustrating. What is the reason for it? No where in my pages do I want overflow:hidden.

Is this a hack to overcome some other limitation with Vaadin or to work around a bad design decision? Why would the framework generate such a thing?

The setting should rarely be a problem if you follow the normal Vaadin way of building layouts. If your content gets clipped, you already have a layout problem of some sort and clipping at least confines the problem.

There are some more technical reasons as well. The overflow:hidden is needed at least in some cases because of the dynamic width calculations when rendering layouts. It’s better to play safe there, as the setting really should not be a problem.

What are your typical use cases when you get such problems? I suppose you can do some layout tricks with overflow:visible, and get scroll bars with overflow:auto, but otherwise it should not be necessary to change it.

I would agree with Marko in that it looks like you are trying to bypass the Vaadin layout mechanisms and effectively create your layouts in CSS, not in Java. Just overriding overflow:hidden would not do what you want in many cases anyway because of the size calculations of Vaadin components and layouts.

If you do want to work more with CSS, you should probably choose CssLayout or e.g.
the SimpleLayout add-on
(or some other suitable add-on layout) for many of your layouts.

Thank you for the responses. I was able to find the root of the issue. The Panel class has a VerticalLayout as it’s content. You need to set panel.getContent().setSizeUndefined() to get horizontal scrolling to work.