react-custom-scrollbars icon indicating copy to clipboard operation
react-custom-scrollbars copied to clipboard

Horizontal scroll bar always visible and not working

Open kalmykovanton opened this issue 6 years ago • 3 comments

I mentioned a strange behavior on MacBook Pro (2017) macOS High Sierra v.10.13.3, browsers: Chrome v.65.0.3325.162 and Safari v.11.0.3 (13604.5.6). When macOS's "Show scroll bars" settings "Automatically based on mouse or trackpad" or "When scrolling" are selected, horizontal scroll bar always visible and not working as expected, please see screenshots and gif below. image ezgif com-video-to-gif But when I choose "Always" option, all works fine. download 1 ezgif com-video-to-gif 1 I've reproduced this issue only on MacBook Pro Retina (2017). On macMini and PC with Ubuntu and full hd monitor all works fine. Please, help me sort out with this problem. Thanks in advance.

kalmykovanton avatar Mar 25 '18 15:03 kalmykovanton

@kalmykovanton What a coincidence! :-) I am looking for solution for this issue just now. I tried to set width='100%' and hideTracksWhenNotNeeded, but it's not working on Chrome (mac, Version 65.0.3325.162) . In my case, it works on Firefox.

shopecific__extension_and_microsoft_word

I probably can hack the source code (react-custom-scrollbars.js line #1287) to be

var viewStyleDefault = exports.viewStyleDefault = {
	    position: 'absolute',
	    top: 0,
	    left: 0,
	    right: 0,
	    bottom: 0,
	   // overflow: 'scroll',
            overflow-y: 'scroll',
	    WebkitOverflowScrolling: 'touch'
	};

Since I never need scroll-x, changing it to overflow-y: 'scroll' could fix the issue, but need a better solution. Anyone?

dongcai avatar Mar 25 '18 15:03 dongcai

same as #281

meikidd avatar Jan 23 '19 07:01 meikidd

@malte-wessel is it possible to fix that? I have the same issue on linux in Chrome, but not in Firefox. The horizontal scroller appears always though it's not needed.

In function getThumbHorizontalWidth() the value trackWidth is always less then width by 1.

If I increase negative value of magrin-right of scroll div by 0.5px in dev tools then that horizontal scroller disappers.

vadzim avatar May 22 '20 18:05 vadzim