From b13bdec8b999ee16691e1f13e1dc63e7a31e17d3 Mon Sep 17 00:00:00 2001 From: xobotyi Date: Thu, 28 Mar 2019 22:31:37 +0300 Subject: [PATCH] bugfix; --- package.json | 2 +- src/Scrollbar.tsx | 5 ++++- tests/Scrollbar.spec.tsx | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index fb6298d..4ffd46d 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "react-scrollbars-custom", "description": "The best React custom scrollbars component", - "version": "4.0.0-alpha.9", + "version": "4.0.0-alpha.10", "repository": { "type": "git", "url": "https://github.com/xobotyi/react-scrollbars-custom.git" diff --git a/src/Scrollbar.tsx b/src/Scrollbar.tsx index e4a016e..69c5ec5 100644 --- a/src/Scrollbar.tsx +++ b/src/Scrollbar.tsx @@ -696,7 +696,10 @@ export default class Scrollbar extends React.Component< scrollValues.clientWidth === 0 && scrollValues.scrollWidth && scrollValues.clientHeight === 0 && - scrollValues.scrollHeight + scrollValues.scrollHeight && + (this.props.translateContentSizesToHolder || + this.props.translateContentSizeYToHolder || + this.props.translateContentSizeXToHolder) ) { return; } diff --git a/tests/Scrollbar.spec.tsx b/tests/Scrollbar.spec.tsx index ea2ae4b..3397058 100644 --- a/tests/Scrollbar.spec.tsx +++ b/tests/Scrollbar.spec.tsx @@ -394,7 +394,7 @@ describe("Scrollbar", () => { ).toBeTruthy(); done(); - }, 20); + }, 60); } ); });