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

Chrome: Default scrollbar on some screen-sizes is not hidden correctly

Open Danilqa opened this issue 6 years ago • 10 comments

screen

If I customize default scrollbar by "::-webkit-scrollbar", I'll get this: image

Unforeseen shifting to right.

Danilqa avatar Jan 20 '18 07:01 Danilqa

Have the same problem 2018-02-09 11 53 49

I can resolve it by using attribute like this : renderView={({ style, ...props }) => <div {...props} style={{ ...style, marginBottom: '-16px' }} />}

, but i suppose, that a not universal decision

RoboQuasar avatar Feb 09 '18 09:02 RoboQuasar

I have the same problem with Chrome

image

image

How I can fix that?

OscarCanek avatar Feb 12 '18 15:02 OscarCanek

Any update on this?

OscarCanek avatar Mar 03 '18 00:03 OscarCanek

I'm seeing this problem in Chrome too.

ev01ve avatar Apr 19 '18 13:04 ev01ve

I see this problem too. But I can resolve this issue by using:

renderView={({ style, ...props }) => <div {...props} style={{ ...style, marginRight: '-18px' }} />}

I think in some specific cases, the width or height of scrollbar could not be calculated truthly and it made our problems.

tungvn avatar May 08 '18 10:05 tungvn

have the same problem in chrome, @tungvn renderview is a props inside scrollbar?

mustofa-binary avatar Nov 06 '19 13:11 mustofa-binary

have the same problem in chrome, @tungvn renderview is a props inside scrollbar?

Yes. See the documentation at https://github.com/malte-wessel/react-custom-scrollbars#usage

tungvn avatar Nov 06 '19 19:11 tungvn

@tungvn thank you, it works for me on windows chrome, however, on mac, there is no scrollbar shown at all. i think PR is needed to fix this

mustofa-binary avatar Nov 07 '19 02:11 mustofa-binary

@mustofa-binary I am really not sure the problem is, so I think just treat like that first

tungvn avatar Nov 07 '19 02:11 tungvn

I have met same problem. as i see, this happen when in os setted option "Make everything bigger". default scroll width(17px) has problems with round after zoom. when i set global scrollbar width to 20px it fix the problem.

upd: function getScrollbarWidth() calculate scrollbar width by creating div in document root. if you reassign scrollbar width somewhere in your app, react-custom-scrollbars won't know about it.

Nichon4 avatar Nov 11 '20 06:11 Nichon4