bug: resized items are not all updated because of debounce by rafSchd in createResizeObserver
Dimitri-WEI-Lingfeng opened this issue ยท 1 comments
Dimitri-WEI-Lingfeng commented
Describe the bug
The code here use rafSchd
to debounce the callback handleEntries
.
masonic/src/use-resize-observer.ts
Line 36 in b8eae68
Remark: ResizeObserver's callback's paramaters entries
does not include all of the elements observed by the observer.
So it's possible that multiple times of invocations would happen in a single animation frame. Which means only the last call, who's entries might not be expected, would really happen.
It's hard to reproduce by simple code. But it's true by logical analysis above and can be simulate in test in my PR.
github-actions commented
๐ This issue has been resolved in version 3.6.2 ๐
The release is available on:
Your semantic-release bot ๐ฆ๐