I have a button using bootstrap button classes "btn btn-default btn-primary btn-xs". An "active" class that contains "background:red;" is added only when a scope variable "isactive" evaluates to true using "ngClass" within the template like the following:
ng-class="{'active': isactive == true}"
I add a click event to the button (ng-click) that once clicked, sets isactive to true.
I notice that when I click the <button>, nothing changes until I click anywhere else on the page, which causes the button to change the color fine.
Oddly, when I click the button and do not click elsewhere, instead when I right click, the button does turn red for a few, but then back to blue. When I inspect the element, it appears the "active" class is applied/added to the set of existing bootstrap classes for buttons. In my CSS, I have the following:
.active {
background:red;
}
.active:active {
background:red;
}
What is the issue? Does this have anything to do with bootstrap button classes?
!importantlike thisbackground: red !important;first. If it works you have to make your rule to become the strongest.