title: Ember: Call Action on Input Field on Focus Out with Argument
body: <p>I'm creating a simple Todo App as I explore EmberJS v2.14.  I want to build in a manual inline editing feature--the user will double-click on a todo line item text span, to open up a input field.  The user will then edit the todo, which will be double bound to a backing object.  And then when focus is lost, the app will re-close the input field back to the newly edited text.</p>
  
  <p>The following fragment of code is inside an <code>{{each}}</code> block helper, and it <em>almost</em> works.</p>
  
  <pre><code>{{#unless todo.isOpenForEdit}}
     &lt;span {{action 'openForEditing' todo on='doubleClick'}}&gt;{{todo.text}}&lt;/span&gt;
  {{else}}
    {{input type="text" value=todo.text action='closeForEditing' on='focus-out'}}
  {{/unless}}
  </code></pre>
  
  <p><strong>Working Pieces</strong></p>
  
  <ul>
  <li>I can double click to go to editing mode (i.e. <code>openForEditing()</code> is correctly called with the write argument.)</li>
  <li>the action handler <code>closeForEditing()</code> is correctly called when focus is lost from the input field.</li>
  </ul>
  
  <p><strong>Pieces Not Working</strong></p>
  
  <ul>
  <li>I don't know how to pass the todo object model as an argument, so
  that the <code>closeForEditing()</code> handler can do the appropriate work of setting
  <code>isOpenForEdit</code> back to false.</li>
  </ul>
  
  <p>--</p>
  
  <p><strong>Q)</strong> How do I pass an argument to an action handler while working with the input helper?</p>
  
  <p><strong>Q)</strong> Is there a different approach I can take, to achieve my goal?</p>