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

What is Framer? Join the Community
Return to index
Chris Camargo
Posted May 29 - Read on Facebook

So are these Framer bugs I'm discovering? http://share.framerjs.com/9u6npxh36pmv/

Issue #1: Tapping the "Dismiss" layer does not trigger a state change. Seems related to the PageComponent issue I was seeing here, because switchInstant() will work, while switch() will not: https://www.facebook.com/groups/framerjs/687287008065040/

Issue #2: Dragging the "coverLayer" up or down slightly from it's resting position when it's in the "up" state will trigger a "TypeError: null is not an object (evaluating 'this._simulation.y')". Seems like this issue hasn't been resolved either: https://www.facebook.com/groups/framerjs/permalink/665992980194443/

Can I get some guidance here, Koen Bok, Benjamin Den Boer, Jorn van Dijk, Jonas Treub?

6 Comments

Chris Camargo

The code, basically in its entirety.

Chris Camargo

[UPDATE: Spoke too soon. The workaround below works for desktop, but doesn't solve the problem on mobile.]

Wow... Okay, so totally unexpected workaround – using the string "click" instead of Events.Click makes the states.switch method work! http://share.framerjs.com/dn5wvjek93wy/

Jordan Robert Dobson

I might post these as issues on github

Chris Camargo

I submitted a request to [email protected] yesterday. Not sure how to write these up as issues, since I'm not sure under what conditions this problem is triggered.

Jordan Robert Dobson

I think the info you have posted is enough.

Chris Camargo

I think I've discovered the root of the issue... I'm doing a states.switch() on Click for the Dismiss bar, but the Dismiss bar is a subLayer of coverLayer. The problem is, I'm doing a check on DragEnd for the coverLayer to see if the user has moved it down far enough to dismiss it, and if not, return it to the top. When I do my Click on dismiss, it's likely issuing the switch() call, but DragEnd is firing immediately, performing the check on coverLayer.y, and keeping in its position at the top.

This is likely similar to how the PageComponent is doing its thing... If it's looking for a DragEnd internally, and I'm trying to bind Events.Click on one of its pages, both will fire – my snapToPage(), and then immediately thereafter, THEIR states.switch() or whatever the hell they're doing in the background.

Now step 2... how the hell do I get around this?

Read the entire post on Facebook