Jump to content
Search Community

Browser back/forward does not work with the two-finger gesture on the Mac trackpad.

STUDIO SPOON test
Moderator Tag

Recommended Posts

Hi,


When I use ScrollSmoother, it seems to disable the browser back/forward using the two-finger gesture on the Mac trackpad.

 

How to reproduce

  1. search on Google
  2. click 'scrollsmoother - GreenSock' 
  3. try back/forward using the two-finger gesture on the Mac trackpad. 

 

Does ScrollSmoother have these specifications?

 

*Please forgive me for not being able to post the Codepen URL, as I could not test the page transition with Codepen.

Link to comment
Share on other sites

29 minutes ago, STUDIO SPOON said:

Is it possible to read the scroll direction differently?  I was hoping to have the vertical direction used for scroll processing and the horizontal direction freed up for browser-native processing.

Not in a practical way because in order to intercept the native browser behavior you must call .preventDefault() on the touch event(s) but you can't know ahead of time which way the user is going to drag, so it's not like we can only call .preventDefault() for vertical and skip it for horizontal. 

 

Of course we can sense the direction after the user starts moving, but it's too late by then because if you preventDefault() on the touchstart, you lose most native functionality last I checked. 

Link to comment
Share on other sites

LocomotiveScroll completely hijacks the native scroll. ScrollSmoother, however, leverages native scroll which offers certain benefits like accessibility and a bunch of other things, but of course there are tradeoffs either way you go. In the distant future, we might alter the core approach if that ends up making sense, but it'll take a lot of exploring and feasibility checking (plus a complete rebuild), so that isn't going to happen anytime soon (if at all). We wouldn't do it the way LocomotiveScroll does - it'd be a very different approach altogether. I wish I had a silver bullet for you, @STUDIO SPOON. When it comes to scrolling, it's a super thorny path with how various browsers work and all the potential tradeoffs of any way you go. I've looked at many, and there simply isn't any approach that solves every problem without tradeoffs. With ScrollSmoother, we tried to take the one with the most up sides and fewest down sides. 

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