React-custom-scrollbars: autoHeight/autoHeightMax in Edge always shows scrollbar

Created on 26 Jan 2017  路  3Comments  路  Source: malte-wessel/react-custom-scrollbars

I have this setup:

<div className="inner-container">
    <Scrollbars autoHeight={true} autoHeightMax={200} style={{ width: "100%" }}>
        Content..
    </Scrollbars>
</div>
.inner-container {
    max-height: 200px;
}

The content is about 125px in height. In FF and Chrome it works fine, but in Edge I always get a vertical scrollbar and it's scrollable for 1 or 2 pixels. I have several 'widgets' with different content (ul, div, table) and the same thing happens everywhere, no matter the height and content.

Is this a bug or am I missing something?

Most helpful comment

Fixed in v4.0.2

All 3 comments

I have the same problem too. scrollHeight property returns incorrect value in Edge.

try to add Math.ceil to the calculation of the scroll

in function getThumbVerticalHeight
change: height = clientHeight / scrollHeight * trackHeight;
to: height = Math.ceil(clientHeight / scrollHeight * trackHeight);

and also in the width in getThumbHorizontalWidth

Fixed in v4.0.2

Was this page helpful?
0 / 5 - 0 ratings

Related issues

umer4ik picture umer4ik  路  4Comments

Amdingo picture Amdingo  路  4Comments

hank7444 picture hank7444  路  5Comments

leofle picture leofle  路  4Comments

eyal1990 picture eyal1990  路  5Comments