dnd-kit icon indicating copy to clipboard operation
dnd-kit copied to clipboard

Avoid ResizeObserver loop limit exceeded

Open nilsgabriel opened this issue 2 years ago • 4 comments

While listening on window error events ResizeObserver loop limit exceeded pops up in Chrome while dragging items between different sortable contexts. Not always but from time to time. (In Firefox ResizeObserver loop completed with undelivered notifications.)

The issue is described here: https://github.com/WICG/resize-observer/issues/38 caused most likely by this hook: useResizeObserver

A solution would be a requestAnimationFrame wrapper (see https://github.com/airbnb/visx/pull/335)

Using versions

@dnd-kit/[email protected] @dnd-kit/[email protected] @dnd-kit/[email protected]

nilsgabriel avatar Feb 09 '23 09:02 nilsgabriel

I've started to get this issue also,

Is there any work around?

In debug we get this message popping up all the time

iamterryclark avatar Apr 05 '23 08:04 iamterryclark

Hi, same here.

@dnd-kit/[email protected] @dnd-kit/[email protected] @dnd-kit/[email protected] @dnd-kit/[email protected]

goldmont avatar Apr 20 '23 16:04 goldmont

I just started experiencing the same issue, with a nested SortableContexts. Any workaround for this?

reinvanimschoot avatar May 29 '23 14:05 reinvanimschoot

Hello, same here "@dnd-kit/core": "^6.1.0", Happens when i drag components within my drop area. Also it doesnt happend when inspect is opened. ResizeObserver loop completed with undelivered notifications. --> Google Chrome

RafaelCENG avatar Jan 26 '24 13:01 RafaelCENG