On the first :hover in Safari 8 checkboxes and radio buttons which are checked will flicker as if it is being clicked. Sample code:
<div>
<label><input type="checkbox" checked> Hover me in Safari 8</label>
</div>
<style>
div {
background-color: #eee;
padding: 1em;
}
label {
line-height: 2em;
display: block;
}
label:hover {
background-color: #fff;
}
</style>
I have also created a JSFiddle here, but keep in mind that this only happens on the first hover event and not on subsequent ones. You need to re-run the code to trigger it again.
Does anyone know where this behaviour stems from and how to prevent it? Neither Chrome nor Firefox exhibits this flicker.
Update
I reported this to Apple at bugreporter.apple.com and they closed my issue (radar 21101864) with the status Duplicate of 17781269 (Open).
Applying -webkit-transform: translateZ(0);
to the input element worked for me (dirty though, I know).
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