I have the following HTML/CSS code:
#not_selectable {
-webkit-tap-highlight-color:transparent;
-webkit-touch-callout:none;
-webkit-user-select:none;
-moz-user-select:none;
-ms-user-select:none;
user-select:none;
}
<p>AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA</p>
<p id="not_selectable">BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB</p>
<p>CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC</p>
I added some CSS to the second line with the B's, so you aren't able to copy or even select it. Try it out: You can select and copy the A's and you can select and copy the C's, but you cannot select or copy the B's.
But, now try so copy the A's as well as the C's as the same time: Select all text. You'll see, the B's won't get selected. Now, copy that and paste it somewhere. In the pasted snipped, you'll also find the B's.
Is there a way to make the B's non-copyable?
EDIT: I just noticed this strange behavior only occurs on Macs Safari browser. With Firefox and Chrome on my Mac it works as expected.