What can make the text unselectable + not copy/pastable on a webpage (I want to select it btw)?

Even less than 5 years away from the AI singularity, Google (and this very site's similar questions part) only returns results on either A- How to select text on a webpage that is unselectable, B- How to make text unselectable on a webpage : I'm seriously impressed by how bad our future seems... not able to differentiate positive from negative... I could run for weeks (or even centuries) asking Google questions to which it doesn't give an answer, yet everytime you ask an interesting question to someone just out of curiosity and for pure conversational purposes, you get told to Google it nowadays... mmph... AI...
So I have a website in which I display a div containing a link that I want the users to be able to copy-paste if they wish. Ironically, I found a function on the web that selects the text via javascript, but even with the text selected, it won't let me copy it to the clipboard... In addition to this there is no way to select anything on the entire webpage, which does include lots of z-index properties (I doubt this is the source of the problem though) and also has it bottom sporting unselectable='on' in its tag, plus each layers of the keys used to play music has xxx-user-select : none in their CSS properties, but the keyrack is positioned lower on the page than the box where the text i want to select sits, and they're also on a lower z-index so I really can't seem to figure what causes both these issues... Probably a damn far-fetched-crap-induced bug that can't be worked around, like I've seen so many in 26 years of programming. They promise us impeccable processing but only come up with stuff that's broken whenever you push the limits farther than they thought one would... AI... yeah right... 2096 scenario : "You have 0$ in your account sir" - No I have 100M$ USD - "You have 0$ in your account sir" ... (Bitch)
Answer
Maybe it (the text) is formatted as an image (or similar)?
A way around this is to use Google Lens to select the text.
Enjoyed this article?
Check out more content on our blog or follow us on social media.
Browse more articles