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

What is Framer? Join the Community
Return to index
Nate Sanders
Posted Jun 09 - Read on Facebook

Anyone have any good ways to prevent a parent scroll component from scrolling when a child scroll component is scrolling?

7 Comments

Jordan Robert Dobson

Looking into direction lock and scroll events depending on what you really need.

Nate Sanders

Well right now they both scroll-- so it has this parallax type of effect. I looked for onScroll for one and set the other's vertical scroll to false, but that didn't work.

Jordan Robert Dobson

Maybe you can alter it's ySpeed instead?

Jordan Robert Dobson

Direction Lock might be what you need.

Sergey Voronov

if both are same direction scrolling, just on childrenlayer start drag parent.scrolling=false on childrentlayerdrag end - parent.scrolling=true with right syntax of course)

Sergey Voronov

sorted;)

Nate Sanders

Just to follow up on this: this scrollEnd event also needs mousewheel set to false to work on desktop

Read the entire post on Facebook