I set the background color of the selection using CSS:
::selection {
background:#cc0000;
color:#fff;
}
::-moz-selection {
background:#cc0000;
color:#fff;
}
In most browsers, when the focus is somewhere else (e.g. IFrame), the highlight color will remain the same, for example:

but in Firefox it will not:

You can see it in action on jsFiddle here .
How can I get Firefox to set the highlight color in this case? This is mistake?
source
share