Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Alexis_G

GSAP Draggable scrollTop snap IOS bug

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 post
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 post
Share on other sites

Yeah, I'd guess that is indeed related. 

Link to post
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.

×