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

What is Framer? Join the Community
Return to index
Jeff Young
Posted Oct 14 - Read on Facebook

When I click a child of a parent, but listen for the event on the parent, I expect the layer variable in the handler to give me the name of the child. It's returning the parent name instead. Any ideas?

In the DOM I would usually be checking and event.currentTarget. I checked in this case and event.currentTarget is the same as


Mike Johnson

I'm not sure I follow? You add the listener to the parent, click the child, and expect the event to display child was clicked? It seems correct to me that the listener is on the parent, and anything inside of that parent is part of the parent, therefore the parent was clicked...

Can you add the listener on the child ? That should give the behavior you are looking for

Jordan Robert Dobson

The child has pointer-events: none set so it won't receive any events at all.

Read the entire post on Facebook