You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Resizing window triggers Error: ResizeObserver loop limit exceeded. The error is not logged in browser's console, but Sentry captures it. It is no big deal, because functionality isn't affected, but it degrades performance.
I was able to find the code producing it even though browser doesn't report exact file and line:
)
Fast browser window resize produces `Error: ResizeObserver loop limit
exceeded`. The error isn't visible in browser console, doesn't affect
functionality, but degrades performance of slider. Solution is taken
from https://stackoverflow.com/a/58701523/17278571.
Fixes#5440
Check that this is really a bug
Reproduction link
https://codesandbox.io/s/d4vlk?file=/index.html
Bug description
Resizing window triggers
Error: ResizeObserver loop limit exceeded
. The error is not logged in browser's console, but Sentry captures it. It is no big deal, because functionality isn't affected, but it degrades performance.I was able to find the code producing it even though browser doesn't report exact file and line:
swiper/src/core/modules/resize/resize.js
Line 15 in eda2aa6
I even tried to wrap the callback in
window.requestAnimationFrame
, as suggested in this comment and it resolves the issue. I am willing to raise a PR.Expected Behavior
Resizing window produces no errors.
Actual Behavior
Resizing window throws
Error: ResizeObserver loop limit exceeded
.Swiper version
7.0.9
Platform/Target and Browser Versions
macOS Chrome 98
Validations
Would you like to open a PR for this bug?
The text was updated successfully, but these errors were encountered: