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

What is Framer? Join the Community
Return to index
Katie Wu
Posted Jul 30 - Read on Facebook

Buttons that used to respond to Events no longer work. In the picture I show that Framer recognizes the physical button on the prototype, and the highlighted code is a simple listener I attached to it. It won't print the line.

8 Comments

Jonas Treub

If you share your prototype I will take a look

Andreas Wahlström

Might be something wrong with the indentation?

Katie Wu

I'm pretty sure the indentation is right - the same syntax works for other buttons, just not this particular one!

Katie Wu

Jonas Treub: Here it is, it's quite a large project and the buggy code is near the bottom. Clicking on the "Drafts" tab leads to you where largeButton is. http://share.framerjs.com/hxmj0r5koy5p/

Koen Bok

Maybe something else is blocking it?

Katie Wu

What does that mean? Like another listener? The button is inside a ScrollContent, but other buttons in similar situations work just fine

Jonas Treub

Using the following code you can print the layerNames of the layers you click. Your navBar seems to block the button.

context = Framer.CurrentContext.getLayers()
for layer in context
[tab]layer.on Events.Click, ->
[tab][tab]print @name

Katie Wu

Thank you I fixed it! But I don't quite understand how the test code works. I added that code to the bottom, but it prints empty string wherever I click, and deactivates all other clickable areas.

Read the entire post on Facebook