I need to disable the highlighting of selected text on my web app. I have a good reason for doing this and know that this is generally a bad idea. But I need to do it anyway
You can use the CSS pseudo class selector ::selection and ::-moz-selection for Firefox.
::selection
::-moz-selection
For example:
::-moz-selection { background-color: transparent; color: #000; } ::selection { background-color: transparent; color: #000; } .myclass::-moz-selection, .myclass::selection { ... }