swille
swille

Reputation: 841

Why doesn't ember.js event bubbling allow it to operate on the form

The Action in my Controller gets called, but the event phase seems to terminate there, and the form is never updated. This means the form's checkboxes and radio buttons do not get marked as selected. Returning True, from the Action produces errors, and still doesn't update the form. What exactly is going on with the event, and how can I allow the bubbling to continue onward to update the form?

JSFiddle

Upvotes: 0

Views: 74

Answers (1)

Marcio Junior
Marcio Junior

Reputation: 19128

By default the {{action}} helper calls evt.preventDefault(). You can skip this behavior using preventDefault=true. So in your code use the following:

{{action 'answerSupplied' answer.id question.id this preventDefault=false}}

Updated jsbin

preventDefault option documentation

Upvotes: 2

Related Questions