[Bug]: Position -1 out of range when deleting custom node at the start of content #6166
Open
1 task done
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
Affected Packages
vue3
Version(s)
2.11.2 2.11.5
Bug Description
Hi,
I'm facing an issue.
I created custom nodes and when i insert one of them at the start (first position) when i want to delete it with my backspace key i get "Position -1 out of range".
Here's my code:
I figured out when i have my cursor at the first position in the editor the position is 1 but when i insert my node the position is 0, i don't know why...
Also, even with
locked: true
i can delete the node, it's another problem...Browser Used
Firefox
Code Example URL
No response
Expected Behavior
expect to delete the node without exception
Additional Context (Optional)
No response
Dependency Updates
The text was updated successfully, but these errors were encountered: