locomotivemtl / locomotive-scroll

🛤 Detection of elements in viewport & smooth scrolling with parallax.
https://locomotivemtl.github.io/locomotive-scroll
MIT License
7.55k stars 1.11k forks source link

Empty space at the bottom of the page #486

Open filonenkoweb opened 1 year ago

filonenkoweb commented 1 year ago

Hello 👋

After scrolling the pages to the bottom, there is an empty space. When I restart the site, the bottom always changes, then there is an empty space, then the footer disappears

I need that there is no empty space at the bottom of the site. Style file included locally

Thank you 👊

mallard132 commented 1 year ago

Just fill in the empty space

rmill2016 commented 1 year ago

Are you able to record your screen and show a demo, maybe a codepen?

developedbygeo commented 1 year ago

If I had to guess, I'd say the document's height is being calculated before everything has properly loaded, so you might want to call update once that has happened or create the instance once everything's in place.

smncd commented 1 year ago

I had a similar issue, this worked for me: https://github.com/locomotivemtl/locomotive-scroll/issues/408#issue-1169457351

HasanSibakhi commented 1 year ago

When reaching the footer, give a footer height for example

footer {
min-height: 1000px
}
HenriHarvest commented 11 months ago

Just use this :

let locoScroll;
            locoScroll = new LocomotiveScroll({
        el: document.querySelector("[data-scroll-container]"),
            smooth: true,
            smartphone: {
                smooth: true
            }
        });
        new ResizeObserver(() => locoScroll.update()).observe(
            document.querySelector("[data-scroll-container]")
        );
SergiOca87 commented 10 months ago

This worked form me:

https://github.com/locomotivemtl/locomotive-scroll/issues/408#issuecomment-1290191143