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

Backspacing through a nested list doesn't work properly #2747

Closed
2 tasks done
dilizarov opened this issue May 1, 2022 · 12 comments · Fixed by #4210
Closed
2 tasks done

Backspacing through a nested list doesn't work properly #2747

dilizarov opened this issue May 1, 2022 · 12 comments · Fixed by #4210
Assignees
Labels
Type: Bug The issue or pullrequest is related to a bug

Comments

@dilizarov
Copy link
Contributor

dilizarov commented May 1, 2022

What’s the bug you are facing?

When backspacing through a list and not starting at the last item, it clears the current item and the text of it's parent... but that is about it.

Video provided

https://www.loom.com/share/0dc205342dae40ecba2b73e715abf030

Which browser was this experienced in? Are any special extensions installed?

Version 99.0.4844.51 (Official Build) (x86_64)

How can we reproduce the bug on our side?

My video above demonstrates the bug.

This is done within your sandbox on tiptap.dev

Can you provide a CodeSandbox?

No response

What did you expect to happen?

I expect to naturally backspace through the list.

Anything to add? (optional)

No response

Did you update your dependencies?

  • Yes, I’ve updated my dependencies to use the latest version of all packages.

Are you sponsoring us?

  • Yes, I’m a sponsor. 💖
@dilizarov dilizarov added the Type: Bug The issue or pullrequest is related to a bug label May 1, 2022
@pcbowers
Copy link

pcbowers commented May 5, 2022

@dilizarov I believe this is not an issue with tiptap as a product and potentially more as an issue with documentation. I have used nested lists several times and am able to backspace appropriately.

That said, I tried to recreate the error myself on the homepage and was unable to do so. Here is my own video for reference:

Nested.List.Removal.Test.mp4

I held the spacebar for the first two levels and then started tapping for the next two. On both, it handled it just fine.

Did you try reloading the page/refreshing cache/restarting the browser?

@dilizarov
Copy link
Contributor Author

You're backspacing from the very last item

Notice in my video that I don't start from the very end of the list, but on a nested item somewhere in the middle of the list.

@bkempe
Copy link

bkempe commented May 5, 2022

Maybe this helps #2493

@pcbowers
Copy link

pcbowers commented May 5, 2022

@dilizarov I somehow missed that on your first comment! Thanks for clarifying.

@dilizarov
Copy link
Contributor Author

@bkempe Yeah, I think your issue is actually basically this.

I'm not sure I understand your workaround though - seems like a completely different text editor? I see it uses ProseMIrror under the hood though... Are you suggesting a ListItem extension plugin that handles backspacing like in your workaround?

I feel like that could work - but then I suppose I'll need to get OrderedList and BulletList to use the new extended listItem, yeah?

@bkempe
Copy link

bkempe commented May 6, 2022

Yes, you'd need some like

const ListItemFixed = ListItem.extend({
  addKeyboardShortcuts() {
    return {
      ...this.parent?.(),
      Backspace: () => backspaceKeyCommand(this.editor, this.name),
    };
  },
});
useEditor({
  extensions: [
    StarterKit.configure({
      listItem: false,
    }),
    ListItemFixed,
  ],
  // ...
});

for TipTap and adjust the code in backspaceKeyCommand

@stale
Copy link

stale bot commented Jul 6, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jul 6, 2022
@bkempe
Copy link

bkempe commented Jul 14, 2022

activity

@stale stale bot removed the stale label Jul 14, 2022
@bdbch bdbch self-assigned this Sep 14, 2022
@bkempe
Copy link

bkempe commented Jan 14, 2023

BTW, the behavior of Remirror is more intuitive than Bangle in backspacing on (nested) lists.

@github-actions
Copy link
Contributor

This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the Info: Stale The issue or pullrequest has not been updated in a while and might be stale label Apr 15, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 25, 2023
@dilizarov
Copy link
Contributor Author

dilizarov commented Apr 25, 2023

saw the bot closed this, but feels like it should stay open as its a bug, yeah? @bkempe just confirmed it is still a bug on the tiptap.dev main website editor.

@bdbch bdbch reopened this Apr 26, 2023
@github-actions github-actions bot removed the Info: Stale The issue or pullrequest has not been updated in a while and might be stale label Jun 11, 2023
@Nantris
Copy link
Contributor

Nantris commented Jun 11, 2023

Anyone following this should follow #3128 and/or #3819 instead.

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.

5 participants