jaredLunde/masonic

bug: resized items are not all updated because of debounce by rafSchd in createResizeObserver

Dimitri-WEI-Lingfeng opened this issue ยท 1 comments

Describe the bug

The code here use rafSchd to debounce the callback handleEntries.

const handleEntries = rafSchd(((entries) => {

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.

๐ŸŽ‰ This issue has been resolved in version 3.6.2 ๐ŸŽ‰

The release is available on:

Your semantic-release bot ๐Ÿ“ฆ๐Ÿš€