This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Josef Richter
Posted Mar 23 - Read on Facebook

Another help request, this time it's more about javascript rather than Framer: I have a scrollable layer containing clickable layers, how do I prevent firing the click event when I'm scrolling on mobile (i.e. I have to touch the screen to scroll, which fires the click event). Thanks. Here's the prototype

2 Comments

Chris Camargo

What I do is separate the click event into TouchStart and TouchEnd. I set a "scrolling" boolean that's set to false on TouchStart. If a TouchMove occurs, I change the boolean, which causes the function to "return false" rather than performing the click action. Take a look: http://share.framerjs.com/fsmumwbb81ne/

Josef Richter

oh yeah, that's cool! thanks Chris Camargo

Read the entire post on Facebook