Closed emilk closed 3 weeks ago
This is caused by the first requestAnimationFrame
firing the callback before the resize observer is run on observe
. Both are asynchronous and it seems like the animation frame takes precedence in the event loop because it is registered first... Or something like that.
Because the resize observer is called not just on every resize but also on the call to observe
(exactly for the purpose of determining the initial dimensions), we can move the first request_animation_frame
from WebRunner::start
to the resize observer callback.
Repro
Result
The symptom is that all windows gets squashed to a very small size, and pushed to the top left corner: