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

What is Framer? Join the Community
Return to index
Vaibhav Kanwal
Posted Sep 08 - Read on Facebook

Hi folks, I am trying to work with the input text field and need an on focus event but I am unsure how to get this to work.

I tried the below statement but this gives me errors.
inputElement.on 'focus', ->

Any pointers?

4 Comments

Benjamin Den Boer

Hey Vaibhav Kanwal, you can target the input element of the layer, like this: :)

Vaibhav Kanwal

Hi Benjamin Thanks for the quick reply. I tried that too but this throws an error. Any idea what could be wrong?

Vaibhav Kanwal

Hey! Ok. It worked, I rephrased it and it worked fine. Thank you so much. The solution to my problem was :
inputElement.onfocus = ->

Jeff B. Léonard

Hi All, I have a similar issue. I have an input element that works just fine, however in order to get that element to scroll I have made it a child of an element that was imported from photoshop. When I do that the input field is no longer editable/clickable by the user and no longer gets the focus attribute. Any idea what I could be doing wrong? Koen Bok

Read the entire post on Facebook