Disable dialog scrolling feature

Hi, is it possible to disable the Dialog component to scroll content?

I want to manage something like this:

In a Dialog add three components
Header,
content,
footer

I want to scroll only the content layout.

The dialog itself scrolls that is not correct for me.

Thanks.

The standard Dialog is usually not scrollable per se, but only if its content is really huge which seems to be the case for you.
You can work around this by manually controlling the sizes of all added layouts (for example: header → 100px, content → 500px, footer → 200px), and making the content layout scrollable if it’s content uses more space than you allowed. This way, the whole Dialog will never be so big as to be scrollable itself.

In short: set the heights of your layouts to a fixed value. Use a [scrollable layout]
(https://vaadin.com/directory/component/scrolllayout) for the content layout.

Kaspar Scherrer:
The standard Dialog is not scrollable per se, only if the content is really huge which seems to be the case for you.
You can work around this by manually controlling the sizes of all content, and making the content layout scrollable if it’s content uses more space than you allowed. This way, the whole Dialog will never be so big as to be scrollable itself.

In short: set the heights of your layouts to a fixed value. Use a [scrollable layout]
(https://vaadin.com/directory/component/scrolllayout) for the content layout.

Hi,

thanks for the reply,

setting fixed heigth is a problem couse the app is for desktop/mobile device.

so the Dialog will be to small for desktop or to big for mobile, it should be set as a percentage, is there a way.

Thanks a lot

Yes setting the height as percentage instead of pixels will also work. As long as the content-layout is not given indefinite height then the dialog itself will not be scrollable.

I see it is getting a scroller by default though there is no content.

http://blog.vaithu.com/2020/05/31/vaadin-dialog-window-show-default-scroller/

Hi,

I have the same problem. Do you know if there is a way to stop the scrollbars from appearing?

I am using 14.3.1

Best Regards
John

John Melody:
Hi,

I have the same problem. Do you know if there is a way to stop the scrollbars from appearing?

I am using 14.3.1

Best Regards
John

Sorry,

at the moment dialog is not so stable for me, i have different behaviour on safari / chrome.