Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent a ResizeObserver error #1923

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

thewilkybarkid
Copy link

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:

ResizeObserver loop completed with undelivered notifications.

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant