Jump to content
Search Community

Resize on matchMedia breakpoint with ScrollTrigger jumps to top of page

HarveyBanham

Go to solution Solved by GreenSock,

Recommended Posts

HarveyBanham
Posted

Hello

 

Having a ScrollTrigger.create() inside gsap.matchMedia() makes the browser jump to the top of the page on window resize when it hits a breakpoint.

I was upgrading GSAP from 3.13 (where this didn't happen) and noticed 3.14 and 3.15 both jump to the top.

 

Minimal demo: https://jsfiddle.net/s51z4xkd/1/

I used jsfiddle, hope that's okay - no signup needed compared to codepen.

 

Thanks!

  • Like 1
Posted

Hey so sorry for the late reply here, this post needed approval for some reason, looking into it!

  • Like 1
HarveyBanham
Posted

Amazing, that version no longer has the issue, thank you so much!

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

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...