Jump to content
Search Community

GSAP Draggable scrollTop snap IOS bug

Alexis_G test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hi,

 

I'm building something like this for a mobile view (in a Vue.js webApp), everything work properly on desktop, but the snap doesn't work on Safari / Chrome mobile.
I tried many things (like using type: 'y' instead) but the problem is still the same...

 

Any help would be appreciated,

 

Thanks.

See the Pen OJLNaZw by yyy589 (@yyy589) on CodePen

Link to comment
Share on other sites

I didn't have a lot of time to look at this, but there are some inherent challenges with scrolling on iOS. If you look at the scrollbar, you'll see that Draggable is indeed being responsive to your touch but iOS is counteracting it in certain cases (no doubt it's trying to be "helpful").  I'd probably avoid the whole scrollTop thing and just affect transforms instead, kinda like this: 

See the Pen mdbPaqv?editors=0010 by GreenSock (@GreenSock) on CodePen

 

Is that any better for you? 

  • Like 1
Link to comment
Share on other sites

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...