Detect When Page is Scrollable?

I have an issue with scrollbars shifting the page about. It feels clunky, so came up with a way to workaround it in my groups.

I simply set a conditional margin to appear that’s the same width as the scrollbar, when the group is not scrollable. This worked perfectly.

Now I’m trying to do the same with the main window but that’s harder, as I do not know what resolution or scale the end user is viewing the page in.

How do I know if the scrollbar is visible on a page?

Setting an aribrary size doesn’t work, because the user may be zoomed in or out, making the measurement useless.

I use some HTML to keep the scrollbar visible even if the page isn’t scrotal scrollable - would that work for you?

That seems like a good solution if there’s no way to know whether the page is scrollable, and would stop the hopping left and right.

How did you manage to get it working?

1 Like

On the page’s properties, the ‘Appearance’ tab, there’s a field for ‘Page HTML Header’ near the bottom, where you’ll include the HTML:

<style>
body {
overflow-y: scroll !important;
}
</style>
1 Like