title: input type=file click not triggered when called from anonymous function
body: <p>I am running into a weird problem. Not sure if it is due to the security concern of any other reason. I have following piece of code:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;Page Title&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;h1&gt;This is a Heading&lt;/h1&gt;
  &lt;p&gt;This is a paragraph.&lt;/p&gt;
  &lt;button onclick='someThgTemp()'&gt;TRY&lt;/button&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;
  &lt;label id='labelId' for='some'&gt;sdfasdf&lt;/label&gt;
  &lt;input id='some' type='file'/&gt;
  &lt;/body&gt;
  &lt;script&gt;
  var someThg = function someThg(){
  alert(2);
  console.log(document.getElementById('labelId'));
    document.getElementById('labelId').click();
  }
  
  function someThgTemp(someThg){
  alert('1');
  var that = this;
    window.setTimeout(function(){
  
    that.someThg();
   }, 3000)
  
  alert(3)
  
  }
  &lt;/script&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>So on this line:</p>
  
  <pre><code>&lt;button onclick='someThgTemp()'&gt;TRY&lt;/button&gt;
  </code></pre>
  
  <p>the file chooser dialog is not shown</p>
  
  <p>Where as if I change the above line to following</p>
  
  <pre><code>&lt;button onclick='someThg()'&gt;TRY&lt;/button&gt;
  </code></pre>
  
  <p>The file chooser is called.Please let me know what I am doing wrong and what is the alternative for it.</p>
  
  <p>The reason to do this being, before showing the file browser I need to validate something. If validated then only I want to show the user file browser.</p>