Luca Reghellin
Luca Reghellin

Reputation: 8103

how to avoid firefox to add overlay color on image click?

take a look please:

enter image description here

The azure one is just clicked. Firefox only. It's just an <img> inside a <li>, no links. Why the hell does it becomes azure?? It's the first time in almost 20 years of web programming I see this. It seems to have nothing to do with ::selection, nor tap highlight, so I can't find a useful css rule to stop it. Firebug shows nothing meaningfull on the styles analisys panel. Also it's the only element in the page that behave this way. So what the hell is it? How to avoid?

Upvotes: 2

Views: 70

Answers (1)

Mosh Feu
Mosh Feu

Reputation: 29277

You can avoid it using user-select: none;

The text of the element and sub-elements will not be able to be selected

Note

This feature is non-standard and is not on a standards track

Upvotes: 1

Related Questions