title: Durandal.js / Knockout.js - Is it possible to return to originating click event after compositionComplete?
body: <p>So I am working on a durandal/knockout app where I click a button defined like so:</p>
  
  <pre><code>&lt;button class="addNote" data-bind="click: function () { addNote($parent); }"&gt;
      &lt;i class="fa fa-plus"&gt;&lt;/i&gt;
  &lt;/button&gt;
  </code></pre>
  
  <p>My "addNote" handler goes off and composes a new view/model (which is basically just a big bound textarea) and inserts them into the screen.  At the end of that composition (in the compositionComplete method) I set the focus on the newly created textarea using knockout's hasFocus binding.</p>
  
  <pre><code>var compositionComplete = function (view, parent) {
      setFocus(true);
  };
  
  &lt;textarea data-bind="value: note, hasFocus: setFocus" autofocus&gt;&lt;/textarea&gt;
  </code></pre>
  
  <p>This is working very nicely because my users are able to press the "Add" button, and start typing a note without having to place their cursor into the &lt;textarea&gt; field.  EXCEPT on mobile devices  (I've tried iPads, iPhones, Nexus tablets, surfaces, samsung s3/s4, windows phones).</p>
  
  <p>The focus is actually set on the &lt;textarea&gt; (I can tell because the focused style we have is applied) but the user still needs to click/tap on the &lt;textarea&gt; to get the soft keyboard to open.  After lots of googling and several failed attempts, I found some people noting success when they set the focus on the &lt;textarea&gt; from the originating click event.</p>
  
  <p>Being fairly new to durandal/knockout, and an average js coder at best, I am wondering if there is a way to have compositionComplete run (so that I know the &lt;textarea&gt; has been loaded) to my click event which could then set the focus? Like a string of promises or some sort of chain of events?  My theory is that if I could wait at the click event to set the focus, the keyboard might just pop up.</p>
  
  <pre><code>&lt;button class="addNote" data-bind="click: function () { someEvent($parent); }"&gt;
      &lt;i class="fa fa-plus"&gt;&lt;/i&gt;
  &lt;/button&gt;
  
  var someEvent = function (parent) {
      addNote(parent);
      //wait here until compositionComplete fires and then setFocus(true);
  };
  </code></pre>