.can() returns false for extension-list even when the command is runnable #3229
Labels
Info: Stale
The issue or pullrequest has not been updated in a while and might be stale
Type: Bug
The issue or pullrequest is related to a bug
What’s the bug you are facing?
The
.can()
command is a bit overzealous for the list extension. If the cursor/selection is on an existing list or heading element, thecan()
command returns false fortoggleBulletList()
andtoggleOrderedList()
commands. However, these commands are still executable, and can/will replace the current node with the new list node type selected.Which browser was this experienced in? Are any special extensions installed?
How can we reproduce the bug on our side?
can()
command for the corresponding controls returns falseCan you provide a CodeSandbox?
https://codesandbox.io/s/frosty-goldwasser-visq8r?file=/src/App.tsx
What did you expect to happen?
The
.can()
command should accurately reflect whether a command is possible to run given the editor state. In this case, because it is totally possible to switch between lists or convert a list to a heading, the.can()
command should return true for all of the described cases above.Anything to add? (optional)
It's possible that the heading being disabled when the nested list item is selected is a separate issue, but I figured I'd leave it here in case it's the same. Otherwise, let me know, and I can open another issue
This issue is related to #3223, but that
pr
fixes issues with the.can()
command for marksDid you update your dependencies?
Are you sponsoring us?
The text was updated successfully, but these errors were encountered: