title: Programmatically set focus of input box from ListView's ItemInvoked event [Windows 8 Metro HTML5]
body: <p><strong>Edit:</strong>  If you have not developed on Windows 8, do not try to answer this question.  Do not vote on it.  Do not even read it.  This is not a web app or website and does not run in a browser.  Please stop down-voting content you do not understand.  This is a Windows 8 METRO HTML5/js application that runs in the Windows Runtime environment.</p>
  
  <p><strong>Original Question:</strong></p>
  
  <p>I want the cursor to be "blinking" in the input box, ready to receive input.  I'm using javascript to set the focus.  This isn't working:</p>
  
  <pre><code>document.querySelector("#input-box").focus();
  </code></pre>
  
  <p>Anyone know why? Is the focus method not the correct one to use for this?</p>
  
  <p>Thank you.</p>
  
  <p><strong>Edit #2:</strong> So it definitely has something to do with the fact that I am trying to set focus to the input from a ListView's "itemInvoked" event.  The event is firing properly, the element is accessible from the event handler, and the line has no errors on execution.  I can set focus to my input tag from a standard button click event, but not from an ItemInvoked event.  So the question is, why can't I set focus from within this event handler?</p>