title: How to recognize that a file-input has opened a window
body: <p>I have a function that runs when the user presses the <kbd>esc</kbd> button:</p>
  
  <pre><code>$(document).on('keyup', function (e) {
      if (e.keyCode == 27) {
          foo();
      }
  });
  </code></pre>
  
  <p>I have a form with a file field. </p>
  
  <pre><code>&lt;input type="file" /&gt;
  </code></pre>
  
  <p>When you click it, it opens a file-manager dialog, which can be closed with the <kbd>esc</kbd> as well. In that case, I want to avoid running the <code>foo</code> function. Is there a way to recognize it with javascript?</p>