Skip to content

Commit b7448df

Browse files
author
Kubit
committed
Improve backtotop
1 parent 904d050 commit b7448df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/backToTop/backToTopControlled.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const BackToTopControlledComponent = React.forwardRef(
6161
button.style.bottom = `${newBottomPosition}px`;
6262
const display = window.scrollY >= visibilityScrollOffset;
6363
button.style.display = display ? 'flex' : 'none';
64-
}, [visibilityScrollOffset]);
64+
}, [bottomPosition, stopElement, visibilityScrollOffset]);
6565

6666
React.useEffect(() => {
6767
handleScrollListener();

0 commit comments

Comments
 (0)