<a> element with :active state specified in CSSmousedown event and call event.preventDefault() for some reasons :):active:active.Here is a test for the case: http://jsbin.com/azajex/4
On W3C there is not deep description, what must be considered active and when.
But all browsers (maybe, not all?) except FF handle mousedown firstly by CSS engine and render the element as :active. It appears to be a long time issue, I tested this case in FF 3.6, 8.0, 13.0 -- all that versions behave exactly the same.
So, what is the right behaviour of a browser in this case?
There is no 'correct behavior'. It is up to browser implementations and should not be relied upon. This is known as undefined behavior. In software engineering, undefined behaviors should be not be relied upon as it has no true documentation nor are the results verifiable.
CSS does not define which elements may be in the above states [pseudo-classes: :hover, :active, and :focus], or how the states are entered and left. Scripting may change whether elements react to user events or not, and different devices and UAs[browsers] may have different ways of pointing to, or activating elements. -W3C CSS Selectors
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With