title: File upload in Chrome
body: <p>I am uploading an image from my PC. It is working fine in Firefox, but in Chrome, the dialog to select the file doesn't open up! I'm invoking click event of input type in Javascript.</p>
  <p>Here is what I'm doing:</p>
  <pre><code>&lt;input type=&quot;file&quot; id=&quot;fileElem&quot; accept=&quot;image/*&quot; style=&quot;display:none&quot; &gt;
  &lt;div id=&quot;fileSelect&quot; class=&quot;drop-area&quot;&gt;Select some files&lt;/div&gt;
  </code></pre>
  <p>Here is Javascript:</p>
  <pre><code>var fileSelect = document.getElementById(&quot;fileSelect&quot;),
  fileElem = document.getElementById(&quot;fileElem&quot;);
  
    
  fileElem.addEventListener(&quot;click&quot;,function(e){
    var files = this.files
    handleFiles(files)
  },false)  
    
    
  fileSelect.addEventListener(&quot;click&quot;, function (e) {
      fileElem.click();
    e.preventDefault(); 
  }, false);
  </code></pre>