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

What is Framer? Join the Community
Return to index
Behzad Boostanchi
Posted Jan 02 - Read on Facebook

Disable state switch animation stop on click

It seems that the default Framer behaviour is to stop state switch animations on Click/Tap events.
Is there any way to disable this behaviour and let the animations to fully finished even after a click?


Jorn van Dijk

Can you share what you are trying to achieve?

Behzad Boostanchi

Thanks Jorn for your reply
Since my project is somehow complex, I've created a new simple project to show the problem that I've faced:

In this project if you drag layerA (a little) downward and release the mouse button, layerA will smoothly continue dragging until it reaches to the 'inventory' state.

But if during the animation, you click inside the layer then layerA will stop in the middle of the way to the final state and this is unwanted for me.

Jonas Treub

You can fix this by listening to the mouseUp event instead of dragEnd.

Behzad Boostanchi

Thanks Jonas !

But since mouseUp doesn't fire on mobile devices, I tried TouchEnd and now it works both on desktop and mobile.
Thanks again for your helpful hint!

BTW, I've updated the sample project for anyone else that might find it helpful.

Jorn van Dijk

Good to hear!

Read the entire post on Facebook