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

TaskItem raises an exception when checkbox clicked #2590

Closed
2 tasks done
clibu opened this issue Feb 28, 2022 · 1 comment
Closed
2 tasks done

TaskItem raises an exception when checkbox clicked #2590

clibu opened this issue Feb 28, 2022 · 1 comment
Labels
Type: Bug The issue or pullrequest is related to a bug

Comments

@clibu
Copy link

clibu commented Feb 28, 2022

What’s the bug you are facing?

When you click on a TaskItem checkbox you get fragment.js:159 Uncaught RangeError: Index 1 out of range for <taskList(taskItem(paragraph))>

How can we reproduce the bug on our side?

See above.

You can replicate this issue on the sample app at https://tiptap.dev/ and on https://tiptap.dev/api/nodes/task-list

Can you provide a CodeSandbox?

The issue is on line 123 in task-item.ts const position = getPos() getPos() is returning undefined which causes tr.doc.nodeAt(position) to raise the exception.

You can replicate this issue on the sample app at https://tiptap.dev/ and on https://tiptap.dev/api/nodes/task-list

What did you expect to happen?

The checkbox state to toggle.

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. 💖
@clibu clibu added the Type: Bug The issue or pullrequest is related to a bug label Feb 28, 2022
@philippkuehn
Copy link
Contributor

Sounds like duplicate of #2372

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

No branches or pull requests

2 participants