Skip to content

Commit aa55f11

Browse files
committed
fix(footer): fade the toolbar background out fully at the bottom
1 parent 80bdfeb commit aa55f11

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎core/src/components/footer/footer.utils.ts‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@ import { clamp } from '@utils/helpers';
33

44
export const handleFooterFade = (scrollEl: HTMLElement, baseEl: HTMLElement) => {
55
readTask(() => {
6-
const scrollTop = scrollEl.scrollTop;
6+
/**
7+
* scrollTop can be fractional while scrollHeight and
8+
* clientHeight are whole pixels. Rounding up lets a
9+
* scroll at the very bottom reach maxScroll, so the
10+
* toolbar background fades out completely.
11+
*/
12+
const scrollTop = Math.ceil(scrollEl.scrollTop);
713
const maxScroll = scrollEl.scrollHeight - scrollEl.clientHeight;
814

915
/**

0 commit comments

Comments
 (0)