I have suddenly in recent months repeatedly suffered FF (last few??? versions) web pages overwriting my X primary selection ON THEIR OWN. This is an enormous vulnerability, as I usually paste with middle mouse button. If FF gets in after my drag-to-select in any app, I'm sometimes shocked to paste remote multi-line content into the Shell :-(
The horrible NetSkope https-mitm-proxy error page (for a small static message a huge JS, that reloads every few seconds) selects the page content on every reload. I thus conscientiously close it ASAP, if I accidentally get it.
I also sometimes get generic (cookie bla bla or some such IIRC) text from some page that I haven't identified (among my ton of open tabs).
Now while writing this, got it twice from SO: when clicking "Ask question" from another Q, I got the
<footer>
of the page I came from become my selection. While playing around, suddenly the instructions that were initially under the Q-form became my selection.
I have studied these Qs, which repeat a gazillion times the same 2 ways to achieve this. They always say a mouse click is necessary, but in my above cases it happens when I'm not even in FF! I WANT THIS TO NEVER HAPPEN!
How do I copy to the clipboard in JavaScript?, Copy To Clipboard Javascript