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

What is Framer? Join the Community
Return to index
Kai Pradel
Posted Feb 25 - Read on Facebook

Trying to figure out how to respond to an onClick event that doesn't automatically trigger an OnMouseLeave event for the underlying layer.

In regular JS this is achieved with event.preventDefault but that does not appear to work in this case. Any help is appreciated.


Radek Kyselý

Why not put the "view video" layer as a child of the underlying one?
Set the underlying layer as a ›superLayer‹ or ›parent‹ on "view video" :)

Kai Pradel

Radek, thanks for your feedback. I have added the button as a child to the overall Thumbnail. The result is somewhat better, but moving the mouse over the button still triggers an onMouseOut event.

Kai Pradel

Does preventDefault just not work in Framer?

Orfeo Chen

Interesting. Waiting for a fix...

Lukas Guschlbauer

There's a "ignoreEvents" boolean! Maybe this would help!

Kai Pradel

Ok, so apparently you can use "mouseenter" and "mouseleave" as events that don't swallow the underlying event. Combination of making the button a child of the thumbnail and using this event did the trick.

Swapnil Borkar

Harsha Kausthubh Future reference for our cards.

Read the entire post on Facebook