title: Enter to submit in chrome app
body: <p>I created a little app, that should perform an action when enter pressed. When I open the html in a browser, it works like I want it to, but when I open it as a chrome app it doesn't. Here's the html:</p>
  
  <pre><code>&lt;input type="text" id='command' onkeydown="keyDown()"&gt;
  </code></pre>
  
  <p>And here's the Javascript:</p>
  
  <pre><code>function keyDown() {
      if (event.keyCode == 13) {
          var command = document.getElementById('command');
          var value = command.value;
          if (value === "exit") {
              alert('hi');
              var mainWindow = chrome.app.window.get('firstInstall');
              mainWindow.close();
          } else {
              document.getElementyId('wrong').className = 'unhidden';
          }
      }
  }
  </code></pre>
  
  <p>(don't mind the 'else{...}' part)</p>
  
  <p>In the browser, the code alerts 'hi', like it should. That's how I know it works in the browser. The chrome app doesn't work though.
  Can anyone help? Thanks!</p>