You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This happens on pretty much all the sites I've tested with Lenis with elements that are position: fixed. The most common use for this is headers/navs and we're seeing the issue on one of our sites that we're testing Lenis out on.
Yeah I suspect it to be hardware related. Not all machines show the issue and it seems to be the less capable ones.
It's almost as if the rendering of fixed elements becomes out of sync with the rendering of the main page since they're in different layers.
Interestingly on our project, we have a WebGL canvas rendering in the background and when it's active the header doesn't lag as much, whereas when it stops rendering the lag becomes more apparent.
I've just tried specifying the scroller wrapper and content elements manually to be elements on the page rather than window and body itself and it seems to have fixed the issue... interesting
I've just tried specifying the scroller wrapper and content elements manually to be elements on the page rather than window and body itself and it seems to have fixed the issue... interesting
Make sense.
It's maybe related to subpixel scrolling ? But honestly I have no clue what happen with this bug and even less how to fix it. Maybe worth leaving a webkit ticket
Experiencing a similar problem with Safari 15.4 on an 2017 intel based macbook . The navigation stays in place but the content is doing a lot a micro-jumps forth and back while scrolling, resulting in a flickering experience.
Similar issue for me on a site I'm building (flickering on scroll in Safari v16.5.2). Setting the wrapper to document.body like @emsitkowski suggested did work for me. However, I found that if I instead just change the wheelEventsTarget: document.body that also worked.
Reacted by Faris Perwira Haqi
Reacted by jake whiteley, Jordan and jonathanalpmyr
I've tried both of the above options on two different sites, latest Lenis version, stripping all other CSS so it's completely vanilla and I'm still seeing the stuttering :(
I even tried setting both the wrapper and wheelEventsTarget to document.body with no luck either.
Are other sources causing the same issue known? I experience similar jitters but not just in Safari but also in some Firefox and chrome instances. With same Lenis & GSAP version but an older version of my website there were no such problems. Some speculations what can possible have broken this?
Not related to position:fixed, but I have had luck (almost!?) fixing Safari wheel event bugs by doing two things:
1: when possible set pointer-events:none on images and video
2: add the wheel listener on more than just window/body, I wrap my content in a "main" tag and apply the listener to that. For some reason the wheel events are appearing on this main tag but often not on the window! Gotta love Safari
I can confirm the issue was related to power saving mode in my case, however, I noticed it's not just limited to when the battery is low or an iOS device is in battery saving mode. It also occurs on Mac laptops (old and new) when "Automatic Graphics Switching" is enabled in System Settings > Battery. This is the default setting, and it seems to take effect even when a laptop is plugged in, so it's a pretty big issue IMO. One potential solution would be to conditionally disable Lenis by listening to the BatteryManager JS API, but I don't think this directly correlates with Apple's power saving logic.
Seems like these issues are kind of a deal breaker to be able to use lenin? if it stutters like that even on a few people and we don't exactly know if and when, that's kind of a big deal ... dam
Activity
clementroche commentedon Jan 19, 2023
Which version of Safari is it ?
ashthornton commentedon Jan 19, 2023
My bad, that might be useful!
Version 15.3 (17612.4.9.1.8)
clementroche commentedon Jan 19, 2023
I can't reproduce on Safari 15.4 using M1 Macbook. So i'm wondering if it's Safari version related or hardware related
ashthornton commentedon Jan 19, 2023
Yeah I suspect it to be hardware related. Not all machines show the issue and it seems to be the less capable ones.
It's almost as if the rendering of fixed elements becomes out of sync with the rendering of the main page since they're in different layers.
Interestingly on our project, we have a WebGL canvas rendering in the background and when it's active the header doesn't lag as much, whereas when it stops rendering the lag becomes more apparent.
clementroche commentedon Jan 19, 2023
Can you try
will-change:transformon those lagging fixed element ? It should enable GPU rendering for this specific elementclementroche commentedon Jan 19, 2023
Just tested on Macbook Intel 2019 (Big Sur) on Safari 14.1 and I can't reproduce neither @ashthornton
ashthornton commentedon Jan 19, 2023
This was the first thing I tried, along with
transform: translate3d(0, 0, 0)andisolation: isolate, none of them solve the issue unfortunately.ashthornton commentedon Jan 19, 2023
I've just tried specifying the scroller wrapper and content elements manually to be elements on the page rather than window and body itself and it seems to have fixed the issue... interesting
clementroche commentedon Jan 19, 2023
Make sense.
It's maybe related to subpixel scrolling ? But honestly I have no clue what happen with this bug and even less how to fix it. Maybe worth leaving a webkit ticket
ww-wolt commentedon Mar 14, 2023
Experiencing a similar problem with Safari 15.4 on an 2017 intel based macbook . The navigation stays in place but the content is doing a lot a micro-jumps forth and back while scrolling, resulting in a flickering experience.
nicolasgermeaux commentedon Apr 20, 2023
Hi guys !
Just wanted to share cause I have the same issue on Safari Version 15.3 - it's not the last one so i'll update it asap.
Hardware : I have a M1 Max Macbook 2021
Here is an example on the Lenis website :
Screen.Recording.2023-04-20.at.00.18.32.mov
sushanyadav commentedon Apr 23, 2023
same issue on safari but issue only persists on power saving / Low power mode.
Edit : It may sound strange, but I was able to fix it by getting rid of the
font-style: italicproperty and using skew instead.clementroche commentedon Apr 23, 2023
interesting...
About low power mode that's because Safari is capping requestAnimationFrame to 30fps so i advise you to disable Lenis on low power mode
clementroche commentedon Jun 14, 2023
maybe related https://github.com/studio-freight/lenis/issues/187
emsitkowski commentedon Jul 28, 2023
I had the same problem on Safari and FIrefox, MacOS Ventura 13.1.1. I use it with ScrollTrigger pinned section and it caused everything to flicker.
I'm pretty sure the fix for me was to set body as wrapper on lenis instance:
new Lenis({ wrapper: document.body });
vonscriptor commentedon Aug 30, 2023
Similar issue for me on a site I'm building (flickering on scroll in Safari v16.5.2). Setting the wrapper to document.body like @emsitkowski suggested did work for me. However, I found that if I instead just change the
wheelEventsTarget: document.bodythat also worked.ashthornton commentedon Sep 13, 2023
I've tried both of the above options on two different sites, latest Lenis version, stripping all other CSS so it's completely vanilla and I'm still seeing the stuttering :(
I even tried setting both the wrapper and
wheelEventsTargettodocument.bodywith no luck either.clementroche commentedon Nov 21, 2023
#266
[-]position: fixed elements seem to lag in MacOS Safari[/-][+]MacOS Safari position:fixed jitter[/+]axherrm commentedon Feb 12, 2024
Are other sources causing the same issue known? I experience similar jitters but not just in Safari but also in some Firefox and chrome instances. With same Lenis & GSAP version but an older version of my website there were no such problems. Some speculations what can possible have broken this?
iliketoplay commentedon Mar 8, 2024
Not related to position:fixed, but I have had luck (almost!?) fixing Safari wheel event bugs by doing two things:
1: when possible set pointer-events:none on images and video
2: add the wheel listener on more than just window/body, I wrap my content in a "main" tag and apply the listener to that. For some reason the wheel events are appearing on this main tag but often not on the window! Gotta love Safari
laroccaf commentedon Apr 17, 2024
I can confirm the issue was related to power saving mode in my case, however, I noticed it's not just limited to when the battery is low or an iOS device is in battery saving mode. It also occurs on Mac laptops (old and new) when "Automatic Graphics Switching" is enabled in System Settings > Battery. This is the default setting, and it seems to take effect even when a laptop is plugged in, so it's a pretty big issue IMO. One potential solution would be to conditionally disable Lenis by listening to the BatteryManager JS API, but I don't think this directly correlates with Apple's power saving logic.
abdulfattahaud commentedon Sep 24, 2024
The funny thing is, the

batteryManageris not supported on safari 😀vlrevolution commentedon Sep 29, 2024
Seems like these issues are kind of a deal breaker to be able to use lenin? if it stutters like that even on a few people and we don't exactly know if and when, that's kind of a big deal ... dam
clementroche commentedon Apr 3, 2025
Might be related: https://codepen.io/GreenSock/pen/ExoyEyg/c0402caac3044c3f5bb85022450b059b