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

Incorrect insert of custom node before same custom node #1673

Closed
volarname opened this issue Aug 3, 2021 · 2 comments · Fixed by #2147
Closed

Incorrect insert of custom node before same custom node #1673

volarname opened this issue Aug 3, 2021 · 2 comments · Fixed by #2147
Labels
Type: Bug The issue or pullrequest is related to a bug

Comments

@volarname
Copy link
Contributor

Description
Multiple bugs with custom nodes:

  • when you try to insert custom node component before the same custom node, it will be inserted under with weird behavior
  • also these wrong inserted components are like broken, like connected, so when you open modal on one it will open on multiple
  • using isolating: true is not preventing the node to be deleted, it can be deleted using keys

Steps to reproduce the bug
Steps to reproduce the behavior:

  1. create a custom node
  2. create a function and button that can insert it
  3. try to insert it before the same node, it will be placed elsewhere

CodeSandbox
I created a CodeSandbox to help you debug the issue: https://codesandbox.io/s/tiptap-issue-template-forked-y7kpl

  1. change color of component to blue using button
  2. click on empty paragraph before custom node
  3. add custom element, multiple times, the new component should be placed before the old one with default yellow color, but no
  4. try to delete the broken components using button, it will open multiple times even if the component instance has set modal to false
  5. also isolating is set to true, and you can delete component using backspace or delete key

Expected behavior
It should insert custom node on position where I want and each component should work individual.
When using isolating=true, node should be not deletable by keys.
Everything worked on prev version of TipTap 1

@volarname volarname added Type: Bug The issue or pullrequest is related to a bug v2 labels Aug 3, 2021
@volarname
Copy link
Contributor Author

Important: its broken only sometimes, try to reload and try to insert multiple at first position

@hanspagel hanspagel removed the v2 label Sep 28, 2021
@patrickcorrigan
Copy link

Also having this problem. Did you find a solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug The issue or pullrequest is related to a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants