Open ellis-s opened 2 years ago
Hi, @ellis-s, I have a similar issue.
Google Chrome is set to not show the scroll bar by default
Are you using Chrome feature flag to enable/disable scrollbar by default?
I had to set Show scroll bars
to Always
on macOS Monterey (v12.5) (as suggested by https://stackoverflow.com/a/22865691). Then the scrollbar started to appear where expected on all browsers.
Hi, I used this react component a few days ago, It's very efficient!
But, today I find a compatibility problem. It does't work when Google Chrome is set to not show the scroll bar by default.
The cause of the problem is the
getScrollbarWidth.ts
file. You will get number 0 by functiongetScrollbarWidth
when Google Chrome is set to not show the scroll bar by default. Because the value ofdiv.offsetWidth
equal to the value ofdiv.clientWidth
.