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

What is Framer? Join the Community
Return to index
Daniel Viedma
Posted Jan 22 - Read on Facebook

Hey folks,
Is there any way to "stopEventPropagation"? So for example a click on a given layer doesn't propagate to its superLayer.
Thanks!

7 Comments

Andrew Nalband

You can explicitly turn off events for a layer with layer.off()

If you're having a specific problem, feel free to post your project and we can help you out!

Daniel Viedma

hi Andrew Nalband, here's my example:

http://share.framerjs.com/u3q1v77vn2lt/

Daniel Viedma

(desired behaviour is clicking on layerA doesn't trigger a click on parent element page1 )

Andrew Nalband
Daniel Viedma

thanks for your response Andrew Nalband. the problem is I don't want to completely disable events on page1, i still want to get those clicks on page1 (except when the clicks are on layerA)

Jiwoong Lee

I think Framer is basically DOM and JS, so you can do whatever you do with JS. In this case, "event.stopPropagation()"
http://share.framerjs.com/lvav8ju7odw0/

Andrew Nalband
Read the entire post on Facebook