We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 79d92a8 commit d1df519Copy full SHA for d1df519
polaris-react/src/components/Scrollable/Scrollable.tsx
@@ -67,6 +67,7 @@ export function Scrollable({
67
68
requestAnimationFrame(() => {
69
const {scrollTop, clientHeight, scrollHeight} = currentScrollArea;
70
+ const canScroll = Boolean(scrollHeight > clientHeight);
71
const isBelowTopOfScroll = Boolean(scrollTop > 0);
72
const isAtBottomOfScroll = Boolean(
73
scrollTop + clientHeight >= scrollHeight - LOW_RES_BUFFER,
@@ -75,7 +76,7 @@ export function Scrollable({
75
76
setTopShadow(isBelowTopOfScroll);
77
setBottomShadow(!isAtBottomOfScroll);
78
- if (isAtBottomOfScroll && onScrolledToBottom) {
79
+ if (canScroll && isAtBottomOfScroll && onScrolledToBottom) {
80
onScrolledToBottom();
81
}
82
});
0 commit comments