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]: Backspace from list with nested items deletes previous content #6128

Open
1 task done
fleon opened this issue Feb 24, 2025 · 1 comment
Open
1 task done

[Bug]: Backspace from list with nested items deletes previous content #6128

fleon opened this issue Feb 24, 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

@fleon
Copy link
Contributor

fleon commented Feb 24, 2025

Affected Packages

extension-list-keymap

Version(s)

2.11.5

Bug Description

If I backspace from a list item that has nested list items, it deletes the content just before/above it. I can undo to revert the deletion.

Related to https://gitlab.com/gitlab-org/gitlab/-/issues/512875

  1. Add some text.
  2. Below that text, add two list items with some text.
  3. Indent the 2nd list item.
  4. Place your cursor at the start of the 1st list item.
  5. Press Backspace to start deleting the previous content.
  6. (You can press CMD+Z to undo)

Browser Used

Chrome

Code Example URL

No response

Expected Behavior

Pressing backspace before a list item containing a nested list should not delete the entire paragraph before it. It should just unindent the list item.

Image

Additional Context (Optional)

No response

Dependency Updates

  • Yes, I've updated all my dependencies.
@fleon fleon 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 Feb 24, 2025
@fleon
Copy link
Contributor Author

fleon commented Feb 24, 2025

I will set some time aside this week to take a deeper look, but it looks like the problem is in https://github.com/ueberdosis/tiptap/blob/develop/packages/extension-list-keymap/src/listHelpers/handleBackspace.ts#L24

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