Scrolling bug on a smartphone

It jumps to the button and to sections below all the time.

How can I fix this scrolling bug?

It’s that Lenis library that we used for smooth scrolling plugin.

It’s very bad, I’ve found tons of issues with it which I fixed, but still new comes… I will try to find some better smooth scrolling library and implement it as a plugin.

1 Like

I don’t use it since all the previous bugs.

It is something else.

I send you my website on a private message.

Please check from where is that bug comes from.

Hi Pakic

Waiting for you to check it.

The screen jumps when I scroll.

The Website address is in a private message.

Is it fixed? It is working fine for me, what device are you on?

Better than before but It doesn’t scroll smoothly.

iPhone 14 Pro - Chrome

This issue is due to lazy loading of images, it doesnt happen if you have couple of images on website, but yours has too many I guess for mobile to handle at a time when it starts scrolling too fast. So when it reaches destination, it lazy loads image (late) and then you get that short jump.

I dont see a possible solution right now from our side, other than you will need to optimize images to work based on aspect ration and position absolute, I will create tutorial for that

1 Like

I’ve created a tutorial on how I handle images on any website I create to ensure that lazy-loading does not cause any jumping behavior. I use a parent div to control the height of my image with padding-bottom in percentage, and then my image inside is positioned absolutely with width and height set to 100%. The tutorial was cut at 5 minutes by Loom, but I had already demonstrated everything by that point.

Just to say again, this is my method. I’m not claiming it’s the best practice, but it has worked for me for years. I’m very used to it, and in most cases, it works great.

1 Like

Thanks a lot @Pakic

I appreciate your tutorial.

But before I change all the photos with this solution I need to know if this is the right solution

Why does it happen also after all the images are loaded?

As you can see in the video it jumps when I scroll and the images are all loaded

And another thing… It doesn’t happen on Safari at all.

On Safari it works perfectly without any issues.

How is that possible?

Here is an example:

The first part is on Safari