Closed fregante closed 4 years ago
I think I figured out why by the way: we inject the script at “document_start” and we’re forcing Firefox to give us the layout size before it’s done evaluating the style sheet.
Chrome I guess pauses our script until the style sheet is done but Firefox just does a layout, displays it and then updates it when the CSS is ready.
Fixes #93
For whatever reasons, the moment you call
getBoundingClientRect
or anyoffset*
properties, we get that ugly FOUC. I'd been seeing this for a long time but never thought it could be an extension causing it.In Firefox only, hide overflowing items and then, after a short wait (🤷‍♂️) run the calculations.
Test
https://github.com/babel/babel