title: Detecting if the file input dialog is open
body: <p>How can I go about detecting if the file input dialog is currently open?</p>
  
  <p>I'm trying to integrate some file upload functionality into a popup (bootstrap style) model on a web app I'm building. As part of the model's behaviour, if escape is pressed, the model is closed.</p>
  
  <p>This is all good till I open a file input dialog from the open model, if I hit escape to close the input dialog, it'll also close the model.</p>
  
  <p>A super simplified version of what I'm trying to achieve
  <a href="http://jsfiddle.net/ckevy/1/" rel="noreferrer">http://jsfiddle.net/ckevy/1/</a></p>