Search
When is it OK to Disable Text Selection?
14.9.2022
Using CSS, it’s possible to prevent users from selecting text within an element using user-select: none. Now, it’s understandable why doing so might be considered “controversial”. I mean, should we be disabling standard user behaviors? Generally speaking, no, we …
When is it OK to Disable...
Click Once, Select All; Click Again, Select Normally
29.4.2020
A bonafide CSS trick from Will Boyd!
Force all the content of an element to be selected when clicked with user-select: all;
If you click a second time, let the user select just parts of the text as normal.
Second click? Well, it’s a trick. You’re really using a time-delayed...
Gotta Select’em All
3.1.2020
I suspect it is not highly known that CSS can control how text is selected. You can do user-select: none; to prevent some text from being selected. That's probably not terribly good UX in general, but perhaps you use some period (.) characters as decoration or something, I could see preventing...