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]: Draging nodes combined with table of content causes crash #5918

Open
1 task done
bbonczek opened this issue Dec 5, 2024 · 0 comments
Open
1 task done

[Bug]: Draging nodes combined with table of content causes crash #5918

bbonczek opened this issue Dec 5, 2024 · 0 comments
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

@bbonczek
Copy link

bbonczek commented Dec 5, 2024

Affected Packages

@tiptap/react

Version(s)

2.10.2

Bug Description

  1. Go to https://templates.tiptap.dev/CJbChqcTbQ
  2. Add 3 headers, so that they show up in table of content
    image
  3. Drag and drop one of the headers
    cinnamon-2024-12-05T144451+0100.webm

Demo will crash.

Browser Used

Chrome

Code Example URL

No response

Expected Behavior

It should just move dragged node without crash.

Additional Context (Optional)

Not sure if that's related, as I don't see demo page source code. In our case TableOfContent uses this code:

  const content = useEditorState({
    editor,
    selector: (ctx) => (ctx.editor.storage.tableOfContents as TableOfContentsStorage).content,
  });

If I remove it, the crash no longer occurs (table of content doesn't work then obviously).

Dependency Updates

  • Yes, I've updated all my dependencies.
@bbonczek bbonczek 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 Dec 5, 2024
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

1 participant