I dropped this code into Chrome.
setInterval( function() {
console.log( $('#element').css('font-size') );
}, 500 );
If I zoomed in and out using ctrl+mousewheel it would randomly change font size to things like:
- 12.222222328186035px
- 11.818181991577148px
- 24px
The correct one is 12px. If I run this in FF, it appears the zooming is blocking so that the interval only spits 12px ever. This seems like a bug I should report to Chrome but was wondering if there’s some spec I’m unaware of.
Happens in safari as well, seems to be a webkit bug. The implementation of the zoom shouldn’t leak to
.getComputedStylethis way.It is already reported here