withastro / astro

The web framework for content-driven websites. ⭐️ Star to support our work!
https://astro.build
Other
46.27k stars 2.45k forks source link

Gsap scroll trigger and lenis scroll not compatible #7758

Closed klevert-ope closed 1 year ago

klevert-ope commented 1 year ago

What version of astro are you using?

2.9.0

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

Npm

What operating system are you using?

Windows

What browser are you using?

Chrome

Describe the Bug

  1. When I click a link to the next page the scroll position of the page does not begin from the top. (Lenis scroll)
    1. When navigating the pages back and forth; the gsap scroll trigger breaks and does not work as intended. (Gsap)
      N/B: I have been experiencing the same issue on barba.js and swup. Kindly help.

What's the expected result?

I expected my scroll trigger to work as I intended in my case it was to pin a section and this then enable the section to scroll the contents horizontally with a vertical movement and on complete it proceeds to the next section. For the next page scroll position I expected it to proceed to the next page and start from the top and not the center.

Link to Minimal Reproducible Example

Klevertopee.com

Participation

lilnasy commented 1 year ago

Is this is a bug introduced by astro?

klevert-ope commented 1 year ago

Not astro, its the view transitions; it seems to be having the same issue similar to barba.js and swup.js

On Wed, Jul 26, 2023, 9:55 PM Arsh @.***> wrote:

Is this is a bug introduced by astro?

— Reply to this email directly, view it on GitHub https://github.com/withastro/astro/issues/7758#issuecomment-1652330161, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATPTUPEJIYMYFKYUVBGIKSDXSFR3BANCNFSM6AAAAAA2TJ7GZE . You are receiving this because you authored the thread.Message ID: @.***>

github-actions[bot] commented 1 year ago

Hello @klevert-ope. Please provide a minimal reproduction using a GitHub repository or StackBlitz. Issues marked with needs repro will be closed if they have no activity within 3 days.

lilnasy commented 1 year ago

Thank you for linking your website, but to fix this issue that isn't sufficient unfortunately. Could you create a reproduction from the basic template?