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

ERROR ResizeObserver loop completed with undelivered notifications.

Open RafaelCENG opened this issue 1 year ago • 5 comments

ERROR ResizeObserver loop completed with undelivered notifications at http://localhost:3000/static/js/bundle.js:315082:58

Happens when I drag an item inside my droppable area to sort them. I'm not using SortContext "@dnd-kit/core": "^6.1.0",

RafaelCENG avatar Jan 30 '24 08:01 RafaelCENG

https://github.com/clauderic/dnd-kit/assets/45431116/267dc4fd-cca6-4af5-8a63-c945b8dbdd16

If i open my inspect first i can't see any error in the console. Also it doesnt show when inspect is opened.

RafaelCENG avatar Jan 31 '24 10:01 RafaelCENG

I am observing the same type of error. As part of a project, I have a Kanban view to create; moving a card too quickly triggers this error :(

Asgarrrr avatar Feb 03 '24 16:02 Asgarrrr

Anything about this one? Trying to create our dnd and its pretty annoying..

RafaelCENG avatar Feb 20 '24 09:02 RafaelCENG

@Asgarrrr hi you found any solutions for fixing it?

RafaelCENG avatar Mar 08 '24 10:03 RafaelCENG

@Asgarrrr hi you found any solutions for fixing it?

Hello!

I'm not sure if it's a proper solution per se, but I added a 10-millisecond throttle in my onDragOver event. I can't really say if that specifically fixed the issue because I made some other small adjustments and tests to address the problem.

const [ throttling, setThrottling ] = useState( false );

const onDragOver = useCallback(
   ( event: DragOverEvent ) => {
      if ( throttling ) return;
      
         ( code for handling cards )

      setThrottling( true );
      setTimeout( ( ) => setThrottling( false ), 10 );
   }
)

Asgarrrr avatar Mar 08 '24 10:03 Asgarrrr