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

fix: attempt to prevent exceeding ResizeObserver loop limit #65

Merged

Conversation

Simek
Copy link
Contributor

@Simek Simek commented Nov 24, 2022

Why

Hopefully should fix #64

How

As stated in the WICG discussion, the workaround to prevent the infinite loops is to call the observer logic within the requestAnimationFrame.

So, this changeset do just that and adds cancelAnimationFrame call to the observer cleanup phase.

Test Plan

Since I'm not sure how to reproduce this locally I have only run the existing tests and launched website locally to confirm that I cannot spot any regression.

@vercel
Copy link

vercel bot commented Nov 24, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
cmdk-website ✅ Ready (Inspect) Visit Preview Nov 24, 2022 at 9:57AM (UTC)

@pacocoursey pacocoursey merged commit 605ae13 into pacocoursey:main Nov 24, 2022
@Simek Simek deleted the fix-resizeobserver-loop-limit-attempt branch November 25, 2022 12:06
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.

ResizeObserver loop limit exceeded Sentry flood
2 participants