For my application, the scrollbar is always present as a placeholder -- whether or not it is actually functional (or if a thumb exists). As a result, checking if a scrollbar is visible does not help. To get around this, am trying to detect if the scrollbar is active by checking the thumb.
With ::-webkit-scrollbar, would assume it is possible to check the thumb's height. However, it is not fully supported across browsers. Is there another way to check for the presence of a scrollbar thumb?
You can check if scrollHeight is bigger than clientHeight , then we know the scrollbar would be shown since there would be overflow the container element holding.