News for hackers. Stuff that matters.
Re:Don't touch my clipboard by chiefsucker on Tuesday February 18, 2020 @06:01AM (#22355051)
This works when you manually select the text, but it fails when you want to select by double-/triple-clicking. In this case the selection ends before the word “me”.

It’s awkward how easily one can break a basic functionality like select & copy.

Re:Don't touch my clipboard by Klathmon on Tuesday February 18, 2020 @11:37AM (#22357253)
There are plenty of other tricks that can be used and won't break the "triple click". I just threw together [1] as an example (and in that one, even if you don't triple click but accidentally select past the end of the line, you are also getting unexpected text).

Combine a few of those techniques with a fancy-looking text box that you are supposed to "click to copy" to get a command, and it becomes pretty easy to even write css-only "exploits" to put stuff in the clipboard!

[1] https://jsfiddle.net/gxosfn83/1/