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

What is Framer? Join the Community
Return to index
Johannes Eckert
Posted May 27 - Read on Facebook

I just found out some weird behavior that helps me a lot:
I am using

layer.on Events.Scroll, ->
log.html = "y: "+y

to read the scroll position.

On mobile, this only updates when the scroll ended, just like I expected in mobile safari.

but, when I add an event listener,

layer.on Events.Click, ->
console.log "clicked the grid, event needed for scroll update"

I get instant updates of the scroll position.
Can we use that to our advantage to have better scroll events on mobile?

3 Comments

Koen Bok

Wait really? You get live scroll events when you add an Events.Click listener?

Johannes Eckert

yes. While you are dragging. Not when innertia is slowing the scroll down. But it's an improvement!

Koen Bok

So yeah I think this is tied to the touchmove event which does streaming updates.

Read the entire post on Facebook