Prevent TextField with action to submit its form
I have {{view Ember.TextField action="foo"}}
nested within a tag <form>
:
My form:
<form>
{{view Ember.TextField action="foo"}}
</form>
I was hoping that clicking enter
on that textbox would trigger an action foo
without triggering an event submit
on its form (because it is Ember.TextField#bubbles
set to by default false
). But this is not the case: the page is reloading.
For semantic and integration purpose, I would like to keep the tag <form>
and not write the view Ember.Form
.
You can test it out in this JSFiddle .
How could I achieve this?
PS: I am using ember-latest:
- version: v1.0.0-pre.4-31-g16442c5
- last commit: 16442c5 (2013-01-23 23:48:09 -0800)
source to share