Color selection changes when Firefox loses focus

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:

enter image description here

but in Firefox it will not:

enter image description here

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?

+5
source share
1 answer

How can I get Firefox to set the highlight color in this case?

Unfortunately, there is no way to do this.

This is mistake?

( Mozilla?) ; , ::selection CSS3. MDN bugzilla.mozilla.org., , , -, 2010 .

, . ::selection UI 4.

+3

All Articles