Closed Simek closed 1 year ago
After a bit of digging it looks like this problem is related to https://github.com/WICG/resize-observer/issues/38 and wrapping the ResizeObserver
logic with window.requestAnimationFrame
should prevent the infinite loops.
Hello, lately we have switched from Algolia Docsearch UI to custom one build upon the CMDK menu on http://docs.expo.dev.
After few days on production I have spotted that we started to receive around 1k Sentry events a day related to the ResizeObserver logic used inside CMDK (
"ResizeObserver loop limit exceeded"
):I have tried to reproduce this problem locally, but without a success. From the reports it looks like this mostly affect desktop users using Chrome or Edge, on macOS and Windows.
You can find our implementation here:
Any hint on how to reproduce or fix that problem would be appreciated.