[Bug]: RangeError Position x outside of fragment when deleting text from draggable paragraph #5203
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
core, react, extension-paragraph
Version(s)
2.4.0
Bug Description
When more than last paragraph is selected by cursor starting from the end (it has to be from the end, otherwise it works fine) and backspace is pressed Range Error Position x outside of fragment occurs.
Paragraph is custom and it extends @tiptap/extension-paragraph and uses ReactNodeViewRenderer with NodeViewContent and NodeViewWrapper.
If the component is set to draggable: false the issue does not occur.
Code Sandbox is provided with bug present.
From what I've found the error occurs at:
tiptap/packages/core/src/extensions/keymap.ts
Line 43 in 1e562ec
Browser Used
Chrome
Code Example URL
https://codesandbox.io/p/sandbox/upbeat-dew-68ntql?file=%2Fsrc%2FApp.js%3A41%2C176
Expected Behavior
Expected to delete fragment of the text.
Additional Context (Optional)
draggable-paragraph-bug.mov
Dependency Updates
The text was updated successfully, but these errors were encountered: