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

What is Framer? Join the Community
Return to index
Charlie Sneath
Posted Apr 21 - Read on Facebook

How I detect the target of a scroll event? I have an h-scroll inside a big v-scroll. I want to lock scroll on the v-scroll while the h-scroll is active.

6 Comments

George Kedenburg III

have you tried directionLock? its meant for this kind of thing

Charlie Sneath

yes, but the issue is that you can also h-swipe the v-scroll. when h-swiping v-scroll do one thing, when h-scrolling h-scroll, do something else

Sigurd Tapio Mannsåker

If the issue is that you just want one or the other to scroll, I may have a solution for you – hold on I'll make a quick example

Sigurd Tapio Mannsåker
Charlie Sneath

is it possible to disable swipe detection for an element? trying to ignoreEvents on the parent when the child is scrolling but doesn't seem to work

Charlie Sneath

that fixes it for now. when the scroll starts on the child, it sets ignoreEvents to true on the parent, and sets back to false when scrolling ends. strangely, I have to force the parent to see if it's ignoreEvents is true or false to disable the swipe gesture, instead the swipe gesture automatically being disabled

Read the entire post on Facebook