How to submit a form using enter key

IMO, the proper way is to wrap your inputs with a <form> tag and put the action there.

<form {{action "doSomething" on="submit"}}>
    {{input type="text" value=foobar}}
    <button type="submit">Save</button>
</form>
11 Likes