Capture return keypress on template action helper


#1

Hello everyone!

I’m trying to capture a return keyPress event on a template action helper.

Basically this is a login form, so I want users to be able to type the password and just hit RETURN.

Looks like this is not working:

<button {{action "select" post on="keyPress"}}>✓</button>

I got this from this place: https://guides.emberjs.com/v2.3.0/templates/actions/

Is this possible?

Thanks!


#2

If anyone has the same trouble, I fixed it by surrounding everything in a form and addinc action to the form