Search code examples
javascriptfirefoxbuttonfocusmozilla

button:focus work perfectly on chrome but not on firefox


I have a button and I want to make some styling on focus on that button. On chrome works perfectly, on Firefox nothing happen.

<button class="cButton">
    button
</button>
.cButton {
color: black;
background: green;
}
.cButton:focus {
    color: white;
    background: red;
}

I've tried

.cButton::-moz-focus-inner {
    color: white;
    background: red;
}

and it didn't work. I am using Firefox 63 on macOS.


Solution

  • On Mozila developer website I found that button does not have focus state for Mac OS

    enter image description here