How can i detect user scroll down or up by using scrollhandler?

You can create a new variable, and name it lastY to save the last Y position. now using the Scroll event:
You can use an if condition like this : if ( lastY < yPosition ) so the user is scrolling up, else, the user is scrolling down.And after this statement you should set the lastY variable to the y positioning.


P.S: i’m not sure which scroll handler extension you use, but i advice you to use this extension , because the other extension by @colintree causes the app to crash, when using multiple fingers.:

2 Likes