Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Drag and drop of complex React Node is not working #6000

Open
1 task done
donovan-fournier opened this issue Jan 7, 2025 · 1 comment
Open
1 task done

[Bug]: Drag and drop of complex React Node is not working #6000

donovan-fournier opened this issue Jan 7, 2025 · 1 comment
Labels
Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug

Comments

@donovan-fournier
Copy link

donovan-fournier commented Jan 7, 2025

Affected Packages

core

Version(s)

2.11.0

Bug Description

Drag and drop of Node element behavior has changed and moving node is not working as before anymore.

Use case:
We have

  • 1 "Parent Node"
    • React component
    • Can contain several "Child Node".
  • n "Child node"
    • Draggable
    • 2 parts: The drag handle, and an editable text

In 2.10.4, when dragging the child anywhere in the parent over the siblings, the drop was made at the position of the drop cursor. The cursor could be over the editable part, the drag part, between 2 children, it was working properly.

Enregistrement.de.l.ecran.2025-01-07.a.15.19.36.mov

In 2.11.0, when dragging the child, the drop is not working when the cursor is over another child. It is only working when it is between the nodes.

Enregistrement.de.l.ecran.2025-01-07.a.15.20.08.mov

Browser Used

Chrome

Code Example URL

https://codesandbox.io/p/sandbox/epic-jasper-5jc5jy?workspaceId=ws_SE9Cmdwat8XqZdktyiSyYj

Expected Behavior

The drop should be accepted

Additional Context (Optional)

May be linked to #5023

Dependency Updates

  • Yes, I've updated all my dependencies.
@donovan-fournier donovan-fournier added Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug labels Jan 7, 2025
@rushillshah
Copy link
Contributor

Interesting, in the sandbox the drop seems to be accepted in some cases

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug
Projects
None yet
Development

No branches or pull requests

2 participants