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

What is Framer? Join the Community
Return to index
JL Flores Mena
Posted Jul 27 - Read on Facebook

Hey all,

If you have used Scroll Components and draggable elements in your prototypes, I'm sure you've encountered the infamous 'this._simulation.y' bug. I went full mythbuster on this and I can say that there's always a solution for that bug. You just have to rethink the logic of your code.

Maybe I should write a post about this to go in-depth about my findings, but for the time being these examples might suffice. Download the projects and look at the code. : )

A few months back Randy Huynh shared this example: Please take a look at the code. (To trigger the bug, drag the element, stop dragging WITHOUT releasing the element, THEN release).

Here's my fix: Check the code, seriously, that fix is a joke.

Here's another example, using dynamic objects:

Things to keep in mind (not all of these are shown in the previous examples):
- Double-check your code if you're using conditionals and '.animate' inside your DragEnd/ScrollEnd events. Your solution might be right there.
- Consider creating an 'Animation' instead of using '.animate' (see Docs).
- X's befores Y's!!
- TouchEnd events trigger BEFORE DragEnd and ScrollEnd. Try to use that in your favor if you're using flags to change the state of things.

I know all of this is a bit abstract, but I hope it helps!


Jordan Robert Dobson

JL Flores Mena _ A post would be great about this!

Randy Huynh

Thanks for looking into it! /thumbsup

Read the entire post on Facebook