clauderic / dnd-kit

The modern, lightweight, performant, accessible and extensible drag & drop toolkit for React.
http://dndkit.com
MIT License
12.81k stars 640 forks source link

Avoid ResizeObserver loop limit exceeded #1025

Open nilsgabriel opened 1 year ago

nilsgabriel commented 1 year ago

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/core@6.0.7 @dnd-kit/modifiers@6.0.1 @dnd-kit/sortable@7.0.2

iamterryclark commented 1 year ago

I've started to get this issue also,

Is there any work around?

In debug we get this message popping up all the time

goldmont commented 1 year ago

Hi, same here.

@dnd-kit/core@6.0.8 @dnd-kit/modifiers@6.0.1 @dnd-kit/sortable@7.0.2 @dnd-kit/utilities@3.2.1

reinvanimschoot commented 1 year ago

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

RafaelCENG commented 8 months ago

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