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

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

Is there a way to use scroll.updateContent() without scrolling back to the top?

3 Comments

Benjamin Den Boer

Hey Charlie Sneath - yes. Say you're updating the content within an AnimationEnd event, then you can also store the current scrollY position first, then immediately set it afterwards. This will effectively leave the scroll position as is. Like this :-)

scrollY = scroll.scrollY
scroll.updateContent()
scroll.scrollY = scrollY

Charlie Sneath

Thanks Benjamin Den Boer. Might this also be the approach to avoid scrolling back to the top when updating a layer's superLayer?

Charlie Sneath

(just tried it out, seems like it works)

Read the entire post on Facebook