-
Notifications
You must be signed in to change notification settings - Fork 22
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
Delete behavior is off #24
Comments
Looks like Would it make sense to add |
Possibly. I'll check out other editors to see what the behavior is and mimic that. |
Did some testing with native behavior, Slate mimics it successfully but it seems to trip on nested lists. https://codesandbox.io/s/q9w2v0xlmq
It behaves the same whether currently selected element is empty or not, it shouldn't delete current list item, even if it's empty. If there's no more content after selection (chars nor blocks), If selection is not collapsed, Also tested slate-edit-list, it has the same bug. |
Thanks for the research. That makes sense to me. Delete forward, including bringing the text up from the next list item. Let me know if you want to take a shot implementing it, and if not, I can go ahead and do it. At the very least, we can get the docs updated to remove the current explanation. |
I was about to take a shot but..
Im on Linux at the moment. On
|
Ah, I didn't see this message earlier. You may need to run:
I used |
By
current
I mean the list item where caret is located whenDelete
is pressed.I should also note that depth doesn't play any role with
Delete
, next or previous list items are literally visually next and previous, even if different depth (I don't have a problem with that).Good cases:
Delete
Bad cases:
Why bad? I personally don't care about
Delete
functionality at all but it would be nice if it worked properly if it's already there. From list documentation:Delete
moves caret to other empty item, this behavior repeats ifDelete
is pressed again, nothing gets removedDelete
is pressed again (when caret is in previous item)These descriptions might get pretty cryptic, my apologies.
The text was updated successfully, but these errors were encountered: