title: <button> breaks Firefox's Selection.getRangeAt
body: <p>The <code>&lt;button&gt;</code> tag seems to mess up Firefox's implentation of <code>Selection.getRangeAt</code>.</p>
  
  <p>Consider the following snippet:</p>
  
  <pre><code>&lt;div&gt;
  Hello,
  &lt;/div&gt;
  
  &lt;button&gt;
  A button
  &lt;/button&gt;
  
  &lt;div&gt;
  how are you?
  &lt;/div&gt;
  </code></pre>
  
  <p>and this JS:</p>
  
  <pre><code>$(document).bind('cut copy', function() {
    let sel = window.getSelection();
    let range = sel.getRangeAt(0);
    sel.removeAllRanges();
    sel.addRange(range);
  });
  </code></pre>
  
  <p>(<a href="https://jsfiddle.net/n9r46o5c/18/" rel="nofollow noreferrer">https://jsfiddle.net/n9r46o5c/18/</a>)</p>
  
  <p>Now, if you select all the text you see, and then copy, it will only have "Hello," selected.  Get rid of the button and it works fine.  Other browsers work fine.  Any ideas?</p>