title: Why does `navigator.clipboard.writeText` not copy text to clipboard if it is proceeded by alert() on android
body: <p>When trying to copy some text on chrome for android with <code>navigator.clipboard.writeText()</code> it works as long as I don't show an alert afterwards. The moment I show an alert() it doesn't work anymore.</p>
  <p>For example this works fine as intended</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function myFunction() {
    var copyText = document.getElementById("myInput");
    copyText.select();
    copyText.setSelectionRange(0, 99999);
    navigator.clipboard.writeText(copyText.value);
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;input type="text" value="Hello world" id="myInput" style="width:auto"&gt;
  &lt;button onclick="myFunction()"&gt;copy&lt;/button&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>However this doesn't work, it doesn't throw any errors in the console and works fine on chrome on PC but not for Android.</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function myFunction() 
  {
    var copyText = document.getElementById("myInput");
    copyText.select();
    copyText.setSelectionRange(0, 99999);
    navigator.clipboard.writeText(copyText.value);
    alert("Successfully copied the text")
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;input type="text" value="Hello world" id="myInput"  style="width:auto" &gt;
  &lt;button onclick="myFunction()" &gt;copy&lt;/button&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>Anyone knows what is going on ?!. Thanks</p>