Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"background-attachment" property causes janky scrolling on Safari #266

Closed
AaronMassingham opened this issue Nov 16, 2023 · 6 comments
Closed

Comments

@AaronMassingham
Copy link

Describe the bug
More of a PSA - I'm aware that position:fixed is on the radar but take care when using the background-attachment: fixed property too. This can cause a janky experience while scrolling.

To Reproduce
Device: MacBook Pro 15" 2018
Browser ver: Safari v17.0
iOS: Sonoma v14.0

@clementroche
Copy link
Member

clementroche commented Feb 8, 2024

closing this in favour of issue #103

@23d1
Copy link

23d1 commented Jun 9, 2024

What was the issue, the linked issue is 404...?

@feledori
Copy link
Contributor

@23d1 fixed the link

@23d1
Copy link

23d1 commented Jun 18, 2024

@feledori thanks! Hmm, it seems to potentially be a slightly different topic.

The issue I'm running into is with gsap scrolltrigger and counteracting the smooth scroll with background-position to emulate background-attachment: fixed. Scrolling sort of grabs those elements, similar to how a page would work when touch scrolling on an iDevice. It's still smooth, but sort of springs out of place and back into into place with every scroll up and down, and then jitters into place across the easing. This is the case across Chrome and Safari.

@feledori
Copy link
Contributor

hmm, @clementroche you know more.

@feledori feledori reopened this Jun 19, 2024
@clementroche
Copy link
Member

@23d1 please provide a reproduction link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants