Share Posted January 29 Hi, We would need an option to ignoreMobileResize also for non-touch devices. Is this possible? Reproduction: The demo simulates a the combination of SmoothScroller, ScrollTrigger and lazy loaded images. The only purpose of the onLeave method is to load the image while a scrub is taking place, it's not part of the actual problem. When scrolling down one can see the blue box animating -200px on y-Axis with a ScrollTrigger and scrub. This blue box is jumping to the beginning of the animation the moment the image is loaded. A lazy loading image may be a layout shift if the height and width of the image tag is not matching the actual size. This can happen if some odd formats like 16:9 get rounded. The difference is mostly between 1 and 2 px. But these 1-2px still are a layout shift and force the SmoothScroller to do a refresh(). A refresh() then forces the scrub animation of a ScrollTrigger to reset. This causes the element to jump. On mobile we have the ignoreMobileResize config. We would need something like this for desktop. So if these little layout shifts happen the SmoothScroller does not refresh(). Best, F See the Pen GRBBdmq by anothercodepen (@anothercodepen) on CodePen Link to comment Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now