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

ItemList console error on click #2299

Closed
1 of 2 tasks
estarossa0 opened this issue Dec 19, 2021 · 9 comments
Closed
1 of 2 tasks

ItemList console error on click #2299

estarossa0 opened this issue Dec 19, 2021 · 9 comments
Labels
Type: Bug The issue or pullrequest is related to a bug

Comments

@estarossa0
Copy link

What’s the bug you are facing?

when using ItemList trying to click on the checkbox output an error in console
Uncaught RangeError: Index 1 out of range for <taskList(taskItem(paragraph))>
is there is a way to prevent this console output from happening ?

How can we reproduce the bug on our side?

just create a Itemlist and click on the checkbox (or just use the example in the docs, as outputs the same)

Can you provide a CodeSandbox?

No response

What did you expect to happen?

no the checkbox getting checked since docs say nothing about it, but at least no console error

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. 💖
@estarossa0 estarossa0 added the Type: Bug The issue or pullrequest is related to a bug label Dec 19, 2021
@philippkuehn
Copy link
Contributor

I can’t reproduce this in our demos with latest chrome/firefox/safari. Feel free to reopen with a reproducable demo.

@jaulz
Copy link
Contributor

jaulz commented Jan 19, 2022

@philippkuehn just stumbled across the same while trying your demos. You can reproduce it by clicking any checkbox in the demo here:
https://tiptap.dev/api/nodes/task-item

@philippkuehn
Copy link
Contributor

@jaulz Then it’s maybe a duplicate of #2372

@jaulz
Copy link
Contributor

jaulz commented Jan 20, 2022

@philippkuehn thanks a lot for your prompt response! it's indeed Bitwarden...

@philippkuehn
Copy link
Contributor

Still not sure why it only causes problems with this extension 🤷‍♂️

@jaulz
Copy link
Contributor

jaulz commented Jan 20, 2022

@philippkuehn it will probably happen with every interaction on an input that is in the within the editor itself because Bitwarden adds a data-com.bitwarden.browser.user-edited="yes"to the input element once it's touched and then the schema does not fit to the output anymore?

@hanspagel
Copy link
Contributor

Probably! Related:
bitwarden/clients#725

@jaulz
Copy link
Contributor

jaulz commented Jan 20, 2022

Yep, that's what I also found but unfortunately there doesn't seem to be an option to disable this behaviour. Even checked the code of the extension itself...

Also checkbox.removeAttribute('data-com.bitwarden.browser.user-edited') in the change handler does not work... 🤔

@philippkuehn
Copy link
Contributor

The only thing you can do is to extend the taskItem extension and add a custom node view without native inputs.

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

4 participants