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: TipTap's liftListItem causing error in block key handlers #73

Open
matthewlipski opened this issue Dec 9, 2022 · 3 comments
Open
Labels
bug Something isn't working prio:high High priority

Comments

@matthewlipski
Copy link
Collaborator

matthewlipski commented Dec 9, 2022

For this particular nesting pattern:

block1
|  block2
|  |  block3
|  |  |  block4
|  block5

With the cursor at the start of block2, attempting to un-indent the block using Backspace or Shift+Tab will result in the following error: Uncaught TransformError: Invalid content for node block. This seems to be an issue with TipTap's liftListItem function, which is used in both key handlers. There are definitely other situations where this happens, the example above is just one case.

It's probably worth mentioning this issue was present before PR #64, so it's almost certainly something going wrong within liftListItem.

@matthewlipski matthewlipski added the bug Something isn't working label Dec 13, 2022
@abrgr
Copy link

abrgr commented Feb 23, 2023

The issue here is that liftListItem attempts to create a block with blockContent followed by two blockGroups. I am experimenting with changing the block schema to allow "blockContent blockGroup*" instead of "blockContent blockGroup?". Can you see any reason that this would be a bad idea to fix this issue? The more straightforward alternative is to collapse the nested blockGroups into one blockGroup within a custom liftListItem.

@matthewlipski matthewlipski added the prio:mid Medium priority label Jul 6, 2023
@avipl
Copy link

avipl commented Feb 27, 2024

@abrgr Hey! did you get chance to work on this issue? or is there any quick workaround for it?

@matthewlipski
Copy link
Collaborator Author

Wanted to fix this in a bug fix release recently but couldn't get it done in time, see #797

@matthewlipski matthewlipski added prio:high High priority and removed prio:mid Medium priority labels Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working prio:high High priority
Projects
None yet
Development

No branches or pull requests

3 participants