Closed cpojer closed 8 years ago
http://jsfiddle.net/SubtleGradient/DWEUH/1/ shows how adding a cssRule fixes this WebKit bug. That's currently the recommended workaround for people experiencing this bug, simple add an empty rule to your CSS that uses :nth-child
.
However, I think we may be able to fix this for people automagically without too much effort, just need to make it work.
Simplest feature test I could come up with
<iframe src="data:text/html;charset=utf-8,<li><li><script>alert(document.querySelectorAll(':nth-child(odd),:nth-child(odd)').length == document.querySelectorAll(':nth-child(odd)').length)</script>"></iframe>
http://jsfiddle.net/SubtleGradient/DWEUH/1/
Repost from lighthouse mootools-core:
this code
fails on chromimum 5.0.342x on windows - whereas it works on IE8 and FF 3.6.12
test case: http://www.jsfiddle.net/mdtVB/9/ expected result: http://www.jsfiddle.net/mdtVB/10/
it is probably a browser error for this version of chrome but it may be worth looking into.
screenshot of bug: http://fragged.org/images/chrome-selector-bug.gif