Skip to content

[Next] Feedback plugin tears down other instances #1701

@chrisvxd

Description

@chrisvxd

Description

In scenarios where multiple feedback plugins exist on the page, tearing down one instance may tear down other instances. This is problematic if the tear-down occurs during a drag, as the feedback styles are removed.

Environment

  • dnd-kit version: 0.1.17

Steps to reproduce

  1. Create two instances of dnd-kit
  2. Add an onDragStart callback to the first instance
  3. In the onDragStart callback, trigger a state change that causes the second instance to unmount and tear down

Sandbox: https://codesandbox.io/p/sandbox/dnd-kit-feedback-plugin-tear-down-g2nt3j

What happens

The dnd-kit <style> attribute used by the active Feedback plugin is removed mid-drag, causing the drag to render incorrectly.

Kapture.2025-05-15.at.18.43.21.mp4

What I expect to happen

Unmounting the second instance of dndkit to have no affect on the first instance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions