-
Notifications
You must be signed in to change notification settings - Fork 53
fix: defer callback to prevent triggering resizeobserver loop limit #72
fix: defer callback to prevent triggering resizeobserver loop limit #72
Conversation
Codecov Report
@@ Coverage Diff @@
## master #72 +/- ##
==========================================
+ Coverage 91.93% 98.41% +6.47%
==========================================
Files 3 3
Lines 124 126 +2
Branches 27 28 +1
==========================================
+ Hits 114 124 +10
+ Misses 10 2 -8
Continue to review full report at Codecov.
|
05c1309 to
1fbacb8
Compare
|
什么场合会出现这个问题呢? |
|
还蛮常见的…… observe 了两个有嵌套关系的元素的时候就会出现 语雀这个没有在控制台报是因为语雀监听了 window.onerror 做了自动上报,可以看 network 里的 /api/logs/error |
| ).toBeFalsy(); | ||
| expect( | ||
| isSamePoint(null, { pageX: 0, pageY: 2, clientX: 3, clientY: 4 }), | ||
| ).toBeFalsy(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed by eslint --fix
|
噢,语雀的 window.onerror 注册在 react 代码执行之前,所以先被我们拦截了 |
|
|
|
in what version is this included @afc163 ? because I'm using the latest (4.8.0) and this error still happens with Table scroll. antd 4.8.0 |
|
@sherly-tkpd remove lock file and re-install. |
I am using antd (4.16.9) and "ResizeObserver loop limit exceeded" still happend when i set "scroll" attribute in Table. |


the observed target might be removed during react re-render, which then triggers
ResizeObserver loop limit exceededorResizeObserver loop completed with undelivered notificationserrorOne way to re-produce this issue is to visit pages with table and tooltip, such as https://yuque.com/dashboard/docs, hover the cursor onto the column header with sorter then an error about
ResizeObserver loop limitis raised.