-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Forward deleting empty paragraph before a list (or other block types) #21558
Comments
I tested and can confirm this (by which occasion I also learned about fn + backspace = forward delete). |
I'm still able to replicate this with: WordPress 6.0.1 I'm a longtime Mac user but also never knew about fn + backspace before! @mtias would you like to keep this issue open or close it, since there's been no movement on it in quite a long time? |
Yes, I was hoping the new list refactor would fix it, but appear to still be an issue |
I can still reproduce it with fn+backspace, the empty paragraph stays and the first list item is converted to a paragraph. However, if I hit backspace while focused on the empty paragraph, it removes the empty paragraph and leaves the list intact. backspace-vs-fn-backspace.mp4 |
The current behaviour looks correct. Forward delete is equivalent to ArrowRight + Backspace, so that's what's happening. Also, the behaviour shouldn't change on wether or not the paragraph is empty I think. What should happen what the paragraph is not empty and selection at then end of it? |
I agree with @ellatrix that the behaviour is correct. |
I disagree. Testing in Apple notes, forward delete is not equivalent to arrow right + backspace. If you have the following:
If you do arrow right the cursor is placed at the beginning of the first list item; if you then press backspace it unindents the list. This is fine. But if you press Fn+Backspace it doesn't do the same — it collapses the empty line and preserves the list. I'd expect the same here. |
Is this the right behavior though? It's supposed to delete chars to the right (or opposite to backspace depending on lang dir) When cursor is on empty new line it is after the invisible new line char, so forward delete removes the marker that is next, and next is the list marker. Wikipedia says:
Maybe the point of the ticket is not to fix but to enhance the behavior to emulate standard text editing conventions? |
Alternatively we immediately transform the next list item to a paragraph AND delete the paragraph, which is what happens now after pressing Delete twice. I thought it's nice to have an intermediate step but maybe it's weird. For Backspace that would also mean immediately merge a list item into a paragraph instead of first "removing" the bullet. |
Leave an empty paragraph and write a list after it. Now focus on the empty paragraph and do FN+Backspace. The list is lost and the content becomes paragraph. I'd expect it to just remove the empty paragraph and leave the list alone.
The text was updated successfully, but these errors were encountered: