Open dialog, underlying page scrolls

HI,

i have a Dialog with a VerticalLayout which is higher then the dialog, so its scollable. But when i scroll to the bottom, the body (underlying page of the dialog) scrolls sometimes. I can not acknowledge a pattern when this occur.

The dialog has setmodal(true)

Does anyone has an idea of how to prevent the underlying page from scolling?

Sounds the default browser behaviour - which you could customize overscroll-behavior - CSS: Cascading Style Sheets | MDN

Thank you, tried adding it to the styles…html but it has not helped. Do you have any suggestion?

Thanks a milllion

No experience on my side, I try to stay away from “let’s change the browser behavior”

1 Like

Preventing overscroll when scrolling in the dialog is one thing, however you can still scroll the page outside of the dialog. A common solution is to hide overflow on the body and also make the scrollbar gutter stable to prevent layout changes in case the scrollbar disappears. This article gives some pointers: Is ‹dialog› enough?

1 Like