Issue metadata
Sign in to add a comment
|
setTimeout + :hover css not applying
Reported by
arhi...@gmail.com,
Nov 20 2017
|
||||||||||||||||||||||||
Issue description
UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.94 Safari/537.36
Steps to reproduce the problem:
<style>.class:hover { color: red; }</style>
<div id="id">TEST</div>
<script>
setTimeout(function(){
document.getElementById('id').className = 'class';
});
</script>
What is the expected behavior?
Hovering the div should change its color to red.
What went wrong?
The class is added, but the CSS for `:hover` doesn't apply. Removing `setTimeout()` wrapper seems to fix it.
Did this work before? N/A
Chrome version: 62.0.3202.94 Channel: stable
OS Version:
Flash Version: Shockwave Flash 27.0 r0
,
Nov 20 2017
Adding any CSS rule to the class (without `:hover`) that forces a repaint on the element (i.e.: `transform: scale(1)`, `margin-top: 1px`) seems to also fix it: https://jsfiddle.net/websiter/n57dsh0v/
,
Nov 20 2017
,
Nov 20 2017
,
Nov 21 2017
Those two CLs landed look unrelated to this issue.
,
Nov 22 2017
Sorry about that. If someone came here looking for jumbo in /cc it's bug 786926 . |
|||||||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||||||
Comment 1 Deleted