title: Web "Copy to Clipboard" without triggering mobile keyboards
body: <p>This JavaScript copies the intended text to the user's clipboard on both desktop and mobile browsers. However on mobile browsers it triggers the phone's keyboard to pop up.</p>
  
  <p>It operates by getting a string from an HTML input and is initiated by an HTML button.</p>
  
  <p>Here I input and define the value and ID it.</p>
  
  <pre><code>&lt;input type="text" value="THIS GETS COPIED" id="CopyThis"&gt;
  </code></pre>
  
  <p>The ID gets passed along to the function which copies it to the clipboard.</p>
  
  <pre><code>function copy() {
  var copyText = document.getElementById("CopyThis");
  copyText.select();
  document.execCommand("copy");
  }
  </code></pre>
  
  <p>This HTML button initiates the function.</p>
  
  <pre><code>&lt;button onclick="copy();"&gt;
  </code></pre>
  
  <p>Is there an alternative method to copying a string of text to a clipboard that doesn't trigger a phone's keyboard on mobile browsers?</p>