Project

General

Profile

Detect when a scrollbar becomes visible

Added by Ola A 5 months ago

Hello,

I have some content in a view that gets covered when the horizontal scrollbar comes on during a resize. I would like to be able to detect when it comes on.

Is there a way to do this without resorting to JavaScript?

Thanks.

Kind regards,
Ola


Replies (2)

RE: Detect when a scrollbar becomes visible - Added by Matthias Van Ceulebroeck 5 months ago

Hello Ola,

I don't believe there is a way to achieve this without some JS.
The best way is probably to compare the element's scrollWidth against the element's clientWidth.

Alternatively to avoid this you may want to provide some custom CSS (in the area of media queries).

Best,
Matthias

RE: Detect when a scrollbar becomes visible - Added by Ola A 5 months ago

Thank you, Matthias

    (1-2/2)