Skip to content

Commit 7160bc2

Browse files
committed
disable scroll for less than 1 pixel
should prevent situations where a friction of pixel enables scroll and hence causes the scrollview-fader appear with no reason
1 parent 04a867d commit 7160bc2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/commons/withScrollEnabler.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function withScrollEnabler<PROPS, STATICS = {}>(WrappedComponent: React.Componen
2525
const layoutSize = useRef(0);
2626

2727
const checkScroll = useCallback(() => {
28-
const isScrollEnabled = contentSize.current > layoutSize.current;
28+
const isScrollEnabled = (contentSize.current - 1) > layoutSize.current;
2929
if (isScrollEnabled !== scrollEnabled) {
3030
setScrollEnabled(isScrollEnabled);
3131
}

0 commit comments

Comments
 (0)