[Bug]: can command not working correctly with list #4057
Labels
Category: Open Source
The issue or pull reuqest is related to the open source packages of Tiptap.
Triage: Open
A new issue or pullrequest that requires triage (added by default)
Type: Bug
The issue or pullrequest is related to a bug
Which packages did you experience the bug in?
extension-ordered-list, extension-unordered-list, extension-task-list, core
What Tiptap version are you using?
2.0.3
What’s the bug you are facing?
We have can command in tiptap to check if a command can be executed - without actually executing it. I am using this command in my editor to check weather toggleOrderedList, toggleBulletList, and toggleTaskList can be executed or not.
These commands are returning
false
for the first item of an already present list, although we are able to execute these commands.For example, if I have a bullet list, and I am at the first item of the list, then
can
command is returning I can't runtoggleOrderedList
, but actually we can run the command to change this list to an ordered list.In below image, ordered-list is present and bullet-list button is
disabled
when we are at first item:In below image, ordered-list is present and bullet-list button is
not disabled
when we are at second item:We can execute the command in the both the cases can be verified here: https://tiptap.dev/examples/default
What browser are you using?
Chrome
Code example
https://codesandbox.io/s/sleepy-heyrovsky-fwddzb?file=/src/App.js
What did you expect to happen?
can
command should work correctly.Anything to add? (optional)
No response
Did you update your dependencies?
Are you sponsoring us?
The text was updated successfully, but these errors were encountered: