Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We have a CI job that runs Playwright against our built site and does a few basic checks to ensure that it's working correctly (to avoid regressions like #1559).
One of our checks is there are no JavaScript errors in the browser. In recent updates to Playwright we're now seeing intermittent failures with:
I've been unable to recreate this in my real browser, but I'm seeing the failure in a Playwright-controlled Chromium 133.0.6943.16 on my machine and in GitHub Actions.
This PR follows the advice on MDN and uses
requestAnimationFrame
to defer the resizing slightly. The result still works in my real browser, and is consistently passing in Playwright (locally).