-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
.can() returns false for extension-list even when the command is runnable #3229
Comments
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 |
This is still an issue |
Also running into this, repro steps in original description are accurate. #3026 looks potentially related:
|
The same problem occurs with If the selection is on an existing list, both commands are runnable, but This issue has been around for some time: #4225 (comment) |
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: